Skip to content

Commit da33480

Browse files
committed
Fix tests for r_t
1 parent 7755807 commit da33480

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_app.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,20 @@ def test_model_raw_start():
291291
# test the things n_days creates, which in turn tests sim_sir, sir, and get_dispositions
292292

293293
# print('n_days: %s; i_day: %s' % (param.n_days, model.i_day))
294-
assert len(raw_df) == (len(np.arange(-model.i_day, param.n_days)) + 1) == 105
294+
assert len(raw_df) == (len(np.arange(-model.i_day, param.n_days + 1))) == 104
295295

296296
first = raw_df.iloc[0, :]
297297
second = raw_df.iloc[1, :]
298298

299299
assert first.susceptible + first.infected + first.recovered == param.population
300-
assert first.susceptible == 460000.0
301-
assert round(second.infected, 0) == 43735
302-
assert list(model.dispositions_df.iloc[0, :]) == [-38, date(year=2020, month=2, day=19), 100.0, 40.0, 20.0]
303-
assert round(raw_df.recovered[30], 0) == 216711
300+
assert first.susceptible == 499600.0
301+
assert round(second.infected, 0) == 449.0
302+
assert list(model.dispositions_df.iloc[0, :]) == [-43, date(year=2020, month=2, day=15), 1.0, 0.4, 0.2]
303+
assert round(raw_df.recovered[30], 0) == 7083.0
304304

305305
d, dt, s, i, r = list(model.dispositions_df.iloc[60, :])
306-
assert dt == date(year=2020, month=4, day=19)
307-
assert [round(v, 0) for v in (d, s, i, r)] == [22, 1101.0, 441.0, 220.0]
306+
assert dt == date(year=2020, month=4, day=15)
307+
assert [round(v, 0) for v in (d, s, i, r)] == [17, 549.0, 220.0, 110.0]
308308

309309

310310
def test_model_raw_end():

0 commit comments

Comments
 (0)