Skip to content

Commit

Permalink
Update test_swmmanywhere.py
Browse files Browse the repository at this point in the history
remove the sim files after running test
  • Loading branch information
Dobson committed Feb 28, 2024
1 parent 5e03873 commit 4d89eaa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_swmmanywhere.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def test_version():

def test_run():
"""Test the run function."""
model = Path(__file__).parent.parent / 'swmmanywhere' / 'defs' /\
'basic_drainage_all_bits.inp'
demo_dir = Path(__file__).parent.parent / 'swmmanywhere' / 'defs'
model = demo_dir / 'basic_drainage_all_bits.inp'
storevars = ['flooding','flow','runoff','depth']
results = swmmanywhere.run(model,
reporting_iters = 50,
Expand All @@ -29,4 +29,7 @@ def test_run():
results_ = swmmanywhere.run(model,
duration = 10000,
storevars = storevars)
assert results_.shape[0] < results.shape[0]
assert results_.shape[0] < results.shape[0]

model.with_suffix('.out').unlink()
model.with_suffix('.rpt').unlink()

0 comments on commit 4d89eaa

Please sign in to comment.