Skip to content

Commit

Permalink
Simulation support: added some tests for COMBINE archives with an inv…
Browse files Browse the repository at this point in the history
…alid SED-ML file (#2493).
  • Loading branch information
agarny committed Jul 1, 2021
1 parent 7ebd140 commit bc52a1f
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
46 changes: 46 additions & 0 deletions src/plugins/support/PythonSupport/tests/data/basictests.out
Expand Up @@ -775,3 +775,49 @@
- Error: the value of 'Preconditioner' (KISAO:0000478) must be 'None' or 'Banded'.
- Error: the value of 'Relative tolerance' (KISAO:0000209) must be a number greater or equal to zero.
- Error: the value of 'Upper half-bandwidth' (KISAO:0000479) must be an integer greater or equal to zero.

---------------------------------------------------------------------
Unsupported local COMBINE archive (output start time)
---------------------------------------------------------------------
- Open simulation
- Check simulation:
- Valid: no
- Issues:
- Information: only SED-ML files with the same values for 'initialTime' and 'outputStartTime' are supported.

---------------------------------------------------------------------
Unsupported local COMBINE archive (algorithm)
---------------------------------------------------------------------
- Open simulation
- Check simulation:
- Valid: no
- Issues:
- Information: unsupported algorithm (KISAO:0000029).

---------------------------------------------------------------------
Unsupported local COMBINE archive (algorithm parameter)
---------------------------------------------------------------------
- Open simulation
- Check simulation:
- Valid: no
- Issues:
- Information: unsupported algorithm parameter (KISAO:0000219).

---------------------------------------------------------------------
Invalid local COMBINE archive (parameter value)
---------------------------------------------------------------------
- Open simulation
- Check simulation:
- Valid: no
- Issues:
- Error: the value of 'Absolute tolerance' (KISAO:0000211) must be a number greater or equal to zero.
- Error: the value of 'Integration method' (KISAO:0000475) must be 'Adams-Moulton' or 'BDF'.
- Error: the value of 'Interpolate solution' (KISAO:0000481) must be 'true' or 'false'.
- Error: the value of 'Iteration type' (KISAO:0000476) must be 'Functional' or 'Newton'.
- Error: the value of 'Linear solver' (KISAO:0000477) must be 'Dense', 'Banded', 'Diagonal', 'GMRES', 'BiCGStab' or 'TFQMR'.
- Error: the value of 'Lower half-bandwidth' (KISAO:0000480) must be an integer greater or equal to zero.
- Error: the value of 'Maximum number of steps' (KISAO:0000415) must be an integer greater than zero.
- Error: the value of 'Maximum step' (KISAO:0000467) must be a number greater or equal to zero.
- Error: the value of 'Preconditioner' (KISAO:0000478) must be 'None' or 'Banded'.
- Error: the value of 'Relative tolerance' (KISAO:0000209) must be a number greater or equal to zero.
- Error: the value of 'Upper half-bandwidth' (KISAO:0000479) must be an integer greater or equal to zero.
36 changes: 36 additions & 0 deletions src/plugins/support/PythonSupport/tests/data/basictests.py
Expand Up @@ -70,3 +70,39 @@
# utils.test_simulation('Invalid remote SED-ML file (parameter value)',
# 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/lorenz_invalid_parameter_value.sedml',
# False, True)

# Test for a COMBINE archive that uses an unsupported output start time

utils.test_simulation('Unsupported local COMBINE archive (output start time)',
'tests/combine/lorenz_unsupported_output_start_time.omex',
False, True)
# utils.test_simulation('Unsupported remote COMBINE archive (output start time)',
# 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/lorenz_unsupported_output_start_time.omex',
# False, True)

# Test for a COMBINE archive that uses an unsupported algorithm

utils.test_simulation('Unsupported local COMBINE archive (algorithm)',
'tests/combine/lorenz_unsupported_algorithm.omex',
False, True)
# utils.test_simulation('Unsupported remote COMBINE archive (algorithm)',
# 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/lorenz_unsupported_algorithm.omex',
# False, True)

# Test for a COMBINE archive that uses an unsupported algorithm

utils.test_simulation('Unsupported local COMBINE archive (algorithm parameter)',
'tests/combine/lorenz_unsupported_algorithm_parameter.omex',
False, True)
# utils.test_simulation('Unsupported remote COMBINE archive (algorithm parameter)',
# 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/lorenz_unsupported_algorithm_parameter.omex',
# False, True)

# Test for a COMBINE archive that uses an invalid parameter value

utils.test_simulation('Invalid local COMBINE archive (parameter value)',
'tests/combine/lorenz_invalid_parameter_value.omex',
False, True)
# utils.test_simulation('Invalid remote COMBINE archive (parameter value)',
# 'https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/lorenz_invalid_parameter_value.omex',
# False, True)

0 comments on commit bc52a1f

Please sign in to comment.