def test_gpibusbcomm_sendcmd_empty_string(): comm = GPIBCommunicator(mock.MagicMock(), 1) comm._version = 5 comm._file.sendcmd = mock.MagicMock() # Refreshed because init makes calls comm._sendcmd("") comm._file.sendcmd.assert_not_called()
def test_gpibusbcomm_sendcmd_empty_string(): comm = GPIBCommunicator(mock.MagicMock(), 1) comm._version = 5 comm._file.sendcmd = mock.MagicMock() # Refreshed because init makes calls comm._sendcmd("") comm._file.sendcmd.assert_not_called()
def test_gpibusbcomm_sendcmd(): comm = GPIBCommunicator(mock.MagicMock(), 1) comm._version = 5 comm._sendcmd("mock") comm._file.sendcmd.assert_has_calls([ mock.call("+a:1"), mock.call("++eoi 1"), mock.call("++read_tmo_ms 1000.0"), mock.call("++eos 2"), mock.call("mock") ])
def test_gpibusbcomm_sendcmd(): comm = GPIBCommunicator(mock.MagicMock(), 1) comm._version = 5 comm._sendcmd("mock") comm._file.sendcmd.assert_has_calls([ mock.call("+a:1"), mock.call("++eoi 1"), mock.call("++read_tmo_ms 1000.0"), mock.call("++eos 2"), mock.call("mock") ])