Skip to content

Commit 4f5a36a

Browse files
committed
test(audit): add tests for first entry in interval audit with no warm-up
1 parent a2420d7 commit 4f5a36a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test_unittest_model.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,28 @@ def helper_warmup(warm_up_period):
220220
f'but got {first_none["q_time_nurse"]}.'
221221
)
222222

223+
# Check that the first interval audit entry with no warm-up has time and
224+
# results of 0
225+
first_interval = results_none['interval_audit'].iloc[0]
226+
assert first_interval['simulation_time'] == 0, (
227+
'With no warm-up, expect first entry in interval audit results to be ' +
228+
f'at time 0, but it was at time {first_interval['simulation_time']}.'
229+
)
230+
assert first_interval['utilisation'] == 0, (
231+
'With no warm-up, expect first entry in interval audit results to ' +
232+
f'have 0 utilisation, but it was {first_interval['utilisation']}.'
233+
)
234+
assert first_interval['queue_length'] == 0, (
235+
'With no warm-up, expect first entry in interval audit results to ' +
236+
'have no queue, but there was queue length of ' +
237+
f'{first_interval['queue_length']}.'
238+
)
239+
assert first_interval['running_mean_wait_time'] == 0, (
240+
'With no warm-up, expect first entry in interval audit results to ' +
241+
'have running mean wait time of 0 but it was ' +
242+
f'{first_interval['running_mean_wait_time']}.'
243+
)
244+
223245

224246
def test_arrivals():
225247
"""

0 commit comments

Comments
 (0)