Skip to content

Commit

Permalink
adapted test
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Jan 6, 2025
1 parent 4fd3f66 commit f50f771
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/test_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,17 @@ def test_maximum_time():
[
(0, pulse1),
(6000, pulse2),
(1e5, None),
(1e5, pulse2),
(pulse1.nb_pulses * pulse1.total_duration, pulse2),
],
)
def test_get_pulse(t, expected_pulse):

my_scenario = Scenario([pulse1, pulse2])

if expected_pulse is None:
with pytest.raises(ValueError):
my_scenario.get_pulse(t=t)
else:
pulse = my_scenario.get_pulse(t=t)
print(pulse.pulse_type)
assert pulse == expected_pulse
pulse = my_scenario.get_pulse(t=t)
print(pulse.pulse_type)
assert pulse == expected_pulse


@pytest.mark.parametrize("t, expected_pulse", [(100, pulse1)])
Expand Down

0 comments on commit f50f771

Please sign in to comment.