Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
multi_instrument_session.vil = 1
multi_instrument_session.pins['PinA', 'PinB', 'PinC'].vil = 2
assert multi_instrument_session.pins['DutPins'].vil == pytest.approx(2, abs=1e-3)
assert multi_instrument_session.pins['SysPins'].vil == pytest.approx(1, abs=1e-3)
# Methods that accept channel_list parameter
states = multi_instrument_session.pins['PinA', 'PinB'].read_static()
assert len(states) == 4 # 2 sites per pin
# Methods that accept pin_list parameter
multi_instrument_session.create_time_set('t0')
multi_instrument_session.pins['PinA', 'PinB'].configure_time_set_drive_format(
time_set_name='t0',
drive_format=nidigital.DriveFormat.RL)
drive_format = multi_instrument_session.pins['PinA', 'PinB'].get_time_set_drive_format(time_set_name='t0')
assert drive_format == nidigital.DriveFormat.RL
def test_configure_time_set_drive_edges2x(multi_instrument_session):
time_set_name = 'time_set_abc'
time_set_period = hightime.timedelta(microseconds=10)
time_set_drive_format = nidigital.DriveFormat.RL
time_set_drive_on = time_set_period * 0.1
time_set_drive_data = time_set_period * 0.2
time_set_drive_return = time_set_period * 0.5
time_set_drive_data2 = time_set_period * 0.7
time_set_drive_return2 = time_set_period * 0.9
time_set_drive_off = time_set_period * 0.9
multi_instrument_session.load_pin_map(os.path.join(test_files_base_dir, "pin_map.pinmap"))
multi_instrument_session.create_time_set(time_set_name)
multi_instrument_session.configure_time_set_period(time_set_name, time_set_period)
multi_instrument_session.pins['site0/PinA', 'site1/PinC'].configure_time_set_edge_multiplier(time_set_name, 2)
multi_instrument_session.pins['site0/PinA', 'site1/PinC'].configure_time_set_drive_edges2x(
time_set_name,
time_set_drive_format,
time_set_drive_on,