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_create_and_delete_advanced_sequence(single_channel_session):
properties_used = ['output_function', 'voltage_level']
sequence_name = 'my_sequence'
single_channel_session.source_mode = nidcpower.SourceMode.SEQUENCE
single_channel_session.create_advanced_sequence(sequence_name=sequence_name, property_names=properties_used, set_as_active_sequence=True)
single_channel_session.create_advanced_sequence_step(set_as_active_step=True)
assert single_channel_session.active_advanced_sequence == sequence_name
single_channel_session.output_function = nidcpower.OutputFunction.DC_VOLTAGE
single_channel_session.voltage_level = 1
single_channel_session.delete_advanced_sequence(sequence_name=sequence_name)
try:
single_channel_session.active_advanced_sequence = sequence_name
assert False
except nidcpower.errors.DriverError:
pass
def _get_library_name():
try:
return _library_info[platform.system()][platform.architecture()[0]]['name']
except KeyError:
raise errors.UnsupportedConfigurationError
def _get_library_name():
try:
return ctypes.util.find_library(_library_info[platform.system()][platform.architecture()[0]]['name']) # We find and return full path to the DLL
except KeyError:
raise errors.UnsupportedConfigurationError
def _get_library_type():
try:
return _library_info[platform.system()][platform.architecture()[0]]['type']
except KeyError:
raise errors.UnsupportedConfigurationError