Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def session():
with nidmm.Session('FakeDevice', False, True, 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe') as simulated_session:
yield simulated_session
def test_error_message():
try:
# We pass in an invalid model name to force going to error_message
with nidmm.Session('FakeDevice', False, True, 'Simulate=1, DriverSetup=Model:invalid_model; BoardType:PXIe'):
assert False
except nidmm.Error as e:
assert e.code == -1074134964
assert e.description.find('The option string parameter contains an entry with an unknown option value.') != -1
def session():
with nidmm.Session('FakeDevice', False, True, 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe') as simulated_session:
yield simulated_session
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViInt64, expected_value)
def __init__(self):
_PointerMatcher.__init__(self, _visatype.ViReal64)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViSession, expected_value)
def __init__(self):
_PointerMatcher.__init__(self, _visatype.ViInt32)
def __init__(self):
_PointerMatcher.__init__(self, _visatype.ViInt64)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViChar, expected_size_or_value)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViInt32, expected_value)