Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_error_message():
try:
# We pass in an invalid model name to force going to error_message
with niscope.Session('FakeDevice', False, True, 'Simulate=1, DriverSetup=Model:invalid_model; BoardType:PXIe'):
assert False
except niscope.Error as e:
assert e.code == -1074118609
assert e.description.find('Simulation does not support the selected model and board type.') != -1
def multiple_niscope_sessions():
with niscope.Session('', False, False, 'Simulate=1, DriverSetup=Model:5164;BoardType:PXIe') as simulated_session_1, niscope.Session('', False, False, 'Simulate=1, DriverSetup=Model:5164;BoardType:PXIe') as simulated_session_2:
yield [simulated_session_1, simulated_session_2]
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViReal64, expected_size_or_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViBoolean, expected_size_or_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViInt32, expected_size_or_value)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViUInt32, expected_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViBoolean, expected_size_or_value)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViInt16, expected_value)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViInt32, expected_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViInt32, expected_size_or_value)