We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 842e6b3 commit a251c8eCopy full SHA for a251c8e
tests/test_app.py
@@ -329,6 +329,16 @@ def test_model_raw_end():
329
assert round(last.susceptible, 0) == 83391.0
330
331
332
+def test_model_monotonicity():
333
+ param = copy(PARAM)
334
+ model = Model(param)
335
+ raw_df = model.raw_df
336
+
337
+ # Susceptible population should be non-increasing, and Recovered non-decreasing
338
+ assert (raw_df.susceptible[1:] - raw_df.susceptible.shift(1)[1:] <= 0).all()
339
+ assert (raw_df.recovered [1:] - raw_df.recovered. shift(1)[1:] >= 0).all()
340
341
342
def test_model_cumulative_census():
343
# test that census is being properly calculated
344
param = copy(PARAM)
0 commit comments