Skip to content

Commit

Permalink
Simulation support: make sure that our Python wrapper reports any iss…
Browse files Browse the repository at this point in the history
…ues (not only blocking ones) (#2493).
  • Loading branch information
agarny committed Jun 29, 2021
1 parent c2433a2 commit 2e4c1b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
6 changes: 4 additions & 2 deletions src/plugins/support/PythonSupport/tests/data/coveragetests.py
Expand Up @@ -113,14 +113,16 @@ def test_data_store_variables(variables, name, indent=''):
# Test for an invalid local/remote file

try:
utils.test_simulation('Invalid local file', 'tests/cellml/underconstrained_model.cellml', False)
utils.test_simulation('Invalid local file',
'tests/cellml/underconstrained_model.cellml',
False, True)
except Exception as e:
print(' - %s' % repr(e))

try:
utils.test_simulation('Invalid remote file',
'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/underconstrained_model.cellml',
False)
False, True)
except Exception as e:
print(' - %s' % repr(e))

Expand Down
Expand Up @@ -23,21 +23,6 @@
- Valid: no
- Issues:
- Error: the model is underconstrained (i.e. some variables need to be initialised or computed).
- Initial settings:
- Ending point: 50.000000
- Point interval: 0.001000
- Run simulation [1]:
- Settings:
- Starting point: 0.000000
- Ending point: 50.000000
- Point interval: 0.001000
- ODE solver: CVODE
- Initial values:
- Constants: empty
- States: empty
- Rates: empty
- Algebraic: empty
- RuntimeError('std::runtime_error: The simulation has an invalid runtime and cannot therefore be run.')

---------------------------------------
Invalid remote file
Expand All @@ -47,21 +32,6 @@
- Valid: no
- Issues:
- Error: the model is underconstrained (i.e. some variables need to be initialised or computed).
- Initial settings:
- Ending point: 50.000000
- Point interval: 0.001000
- Run simulation [1]:
- Settings:
- Starting point: 0.000000
- Ending point: 50.000000
- Point interval: 0.001000
- ODE solver: CVODE
- Initial values:
- Constants: empty
- States: empty
- Rates: empty
- Algebraic: empty
- RuntimeError('std::runtime_error: The simulation has an invalid runtime and cannot therefore be run.')

---------------------------------------
SimulationData coverage tests
Expand Down

0 comments on commit 2e4c1b5

Please sign in to comment.