Mocking console for cli unittesting
user_input = ['6 1']
expected_output = '84 + 7 =
' \r ' OK! '
with patch('builtins.input', side_effect=user_input):
with patch('sys.stdout', new=io.StringIO()) as output:
dodawanie(84, 7)
self.assertEqual(expected_output, output.getvalue())
How to test input processing in Python 3
#python #testing
QuantumCircut is the quantum program. You build it with registers, quantum gates. Then compile and run on the quantum chip, without interaction. In the end you get results thanks to measure gates.
#qc
Small fix Issue 915 for Qiskit Terra.
#qc
Small help for Qiskit Terra on Github and StackOverflow.
#qc
Created IBM Quantum backend dashboard: https://lukaszherok.com/dash
#qc #flask
Using IBM Q Experience Qunatum Computer as perfect random number generator.
#qc
New Ansible playbook for automatic software upgrade on multiple servers.
Fedora 29 installed on the old laptop with WinXP. Need to move Win partition with GParted to make place for grub2 bootloader.
#linux
Installed Pi-Hole (awesome installer) in my home. Now I'm Ad free :D
#rpi