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_advanced_arb_sequence(session_5421):
seq_handle_base = 100000 # This is not necessary on 5433 because handles start at 0.
waveform_data = [x * (1.0 / 256.0) for x in range(256)]
waveform_handles_array = [session_5421.create_waveform(waveform_data), session_5421.create_waveform(waveform_data), session_5421.create_waveform(waveform_data)]
marker_location_array = [0, 16, 32]
sample_counts_array = [256, 128, 64]
loop_counts_array = [10, 20, 30]
session_5421.output_mode = nifgen.OutputMode.SEQ
# Test relies on value of sequence handles starting at a known value and incrementing sequentially. Hardly ideal.
assert ([], seq_handle_base + 0) == session_5421.create_advanced_arb_sequence(waveform_handles_array, loop_counts_array=loop_counts_array)
assert ([], seq_handle_base + 1) == session_5421.create_advanced_arb_sequence(waveform_handles_array, loop_counts_array=loop_counts_array, sample_counts_array=sample_counts_array)
assert (marker_location_array, seq_handle_base + 2) == session_5421.create_advanced_arb_sequence(waveform_handles_array, loop_counts_array=loop_counts_array, marker_location_array=marker_location_array)
assert (marker_location_array, seq_handle_base + 3) == session_5421.create_advanced_arb_sequence(waveform_handles_array, loop_counts_array=loop_counts_array, sample_counts_array=sample_counts_array, marker_location_array=marker_location_array)
def test_reset(session):
default_output_mode = session.output_mode
assert default_output_mode == nifgen.OutputMode.ARB
session.output_mode = nifgen.OutputMode.SEQ
assert session.output_mode == nifgen.OutputMode.SEQ
session.reset()
assert session.output_mode == nifgen.OutputMode.ARB
def test_reset(session):
default_output_mode = session.output_mode
assert default_output_mode == nifgen.OutputMode.ARB
session.output_mode = nifgen.OutputMode.SEQ
assert session.output_mode == nifgen.OutputMode.SEQ
session.reset()
assert session.output_mode == nifgen.OutputMode.ARB