Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Nov 3, 2024
1 parent ebbb4a1 commit cd281f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_maximum_time():

@pytest.mark.parametrize(
"t, expected_pulse",
[(0, pulse1), (6000, pulse2), (1e5, None), (pulse1.total_duration, pulse2)],
[(0, pulse1), (6000, pulse2), (1e5, None), (pulse1.nb_pulses * pulse1.total_duration, pulse2)],
)
def test_get_pulse(t, expected_pulse):

Expand All @@ -160,6 +160,7 @@ def test_get_pulse(t, expected_pulse):
my_scenario.get_pulse(t=t)
else:
pulse = my_scenario.get_pulse(t=t)
print(pulse.pulse_type)
assert pulse == expected_pulse


Expand Down Expand Up @@ -202,7 +203,7 @@ def test_get_time_till_row(row, expected_time):
def test_reading_a_file():
my_scenario = Scenario([pulse1, pulse2])

times = np.linspace(0, my_scenario.get_maximum_time(), 1000)
times = np.linspace(0, my_scenario.get_maximum_time(), 1000, endpoint=False)
pulse_types = []
for t in times:
pulse_type = my_scenario.get_pulse_type(t)
Expand Down

0 comments on commit cd281f8

Please sign in to comment.