From 4ea4845a18bdac3c5b782e299129a98bf0cdfa7b Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Mon, 9 Dec 2019 16:41:40 +1300 Subject: [PATCH] Some minor cleaning up. --- src/plugins/support/PythonSupport/tests/data/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/support/PythonSupport/tests/data/tests.py b/src/plugins/support/PythonSupport/tests/data/tests.py index 5c375f1a7b..3eefa59acb 100755 --- a/src/plugins/support/PythonSupport/tests/data/tests.py +++ b/src/plugins/support/PythonSupport/tests/data/tests.py @@ -50,6 +50,8 @@ def test_simulation(title: str, file_name_or_url: str, first: bool = True) -> No oc.close_simulation(simulation) +# Test for an unknown local/remote file + try: test_simulation('Unknown local file', 'unknown') except Exception as e: @@ -61,6 +63,8 @@ def test_simulation(title: str, file_name_or_url: str, first: bool = True) -> No except Exception as e: print(repr(e)) +# Test for an invalid local/remote file + try: test_simulation('Invalid local file', 'cellml/underconstrained_model.cellml', False) except Exception as e: @@ -73,14 +77,20 @@ def test_simulation(title: str, file_name_or_url: str, first: bool = True) -> No except Exception as e: print(repr(e)) +# Test for a local/remote CellML file + test_simulation('Local CellML file', 'cellml/lorenz.cellml', False) test_simulation('Remote CellML file', 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/lorenz.cellml', False) +# Test for a local/remote SED-ML file + test_simulation('Local SED-ML file', 'sedml/lorenz.sedml', False) test_simulation('Remote SED-ML file', 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/lorenz.sedml', False) +# Test for a local/remote COMBINE archive + test_simulation('Local COMBINE archive', 'combine/lorenz.omex', False) test_simulation('Remote COMBINE archive', 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/lorenz.omex', False)