Skip to content

Commit

Permalink
Update documentation for runCythonTests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 6, 2022
1 parent 9cb6806 commit 1b901ae
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions test/python/runCythonTests.py
@@ -1,21 +1,36 @@
"""
Unit tests for Cantera's Cython-based Python module.
This script gathers all the tests defined 'cantera.test' module, runs them,
and prints a report. Extra command line arguments can be used to run subsets
of the test suite, for example:
This script is used by SCons to run the Python test suite, where ``pytest`` is used
as the test runner. All arguments are handled by SCons configurations.
all tests from 'test_thermo.py' and 'test_kinetics.py':
This script gathers all Python tests, runs them, and prints a report::
python runCythonTests.py
Extra command line arguments can be used to run subsets of the test suite, for example
all tests from ``test_thermo.py`` and ``test_kinetics.py``::
python runCythonTests.py thermo kinetics
all tests from the 'test_reactor.TesTIdealGasReactor' class:
As an alternative, tests can be run using ``pytest`` directly, as illustrated for the
following examples (run from Cantera's root folder):
all tests::
pytest test/python
all tests from ``test_transport.py``::
pytest test/python/test_transport.py
all tests from the ``test_reactor.TestIdealGasReactor`` class::
python runCythonTests.py reactor.TestIdealGasReactor
pytest test/python/test_reactor.py::TestIdealGasReactor
a single test:
a single test::
python runCythonTests.py onedim.TestDiffusionFlame.test_mixture_averaged
pytest test/python/test_onedim.py::TestDiffusionFlame::test_mixture_averaged
"""

import sys
Expand Down

0 comments on commit 1b901ae

Please sign in to comment.