From 4d89eaa1985bcccfd7f838d51892f46c5a1f33b7 Mon Sep 17 00:00:00 2001 From: Dobson Date: Wed, 28 Feb 2024 13:03:20 +0000 Subject: [PATCH] Update test_swmmanywhere.py remove the sim files after running test --- tests/test_swmmanywhere.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_swmmanywhere.py b/tests/test_swmmanywhere.py index 77713d51..b854c230 100644 --- a/tests/test_swmmanywhere.py +++ b/tests/test_swmmanywhere.py @@ -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, @@ -29,4 +29,7 @@ def test_run(): results_ = swmmanywhere.run(model, duration = 10000, storevars = storevars) - assert results_.shape[0] < results.shape[0] \ No newline at end of file + assert results_.shape[0] < results.shape[0] + + model.with_suffix('.out').unlink() + model.with_suffix('.rpt').unlink() \ No newline at end of file