Skip to content

Commit

Permalink
mod for virus
Browse files Browse the repository at this point in the history
  • Loading branch information
stgm committed Oct 11, 2022
1 parent e5bf829 commit f44644c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/virusTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ def testMethod():

viruses = ["GGGG", "AAAA", "TTTT", "GGGG", "ATGC"] * 20
n_trials = 100
timesteps = 1000
timesteps = 100

avg = lambda : sum(simulate(viruses[:], 0.1, 0.1, 0.5, 100, timesteps)) / timesteps
avg_pop_size = sum(avg() for _ in range(n_trials)) / n_trials

if not 50 <= avg_pop_size <= 75:
return False, f"expected an average population size of roughly 50 to 65, but found {avg_pop_size}"
if not 85 <= avg_pop_size <= 90:
return False, f"expected an average population size of roughly 85 to 90, but found {avg_pop_size}"

return True

Expand Down

0 comments on commit f44644c

Please sign in to comment.