Skip to content

Commit

Permalink
Usin pytest instead of run-tests mentions
Browse files Browse the repository at this point in the history
Signed-off-by: Pradyot Ranjan <[email protected]>
  • Loading branch information
prady0t committed Nov 28, 2024
1 parent 4c4a101 commit 6a75ffa
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docs/source/user_guide/installation/install-from-source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,31 +237,27 @@ Finally, to run the unit and the integration suites sequentially, use
nox -s tests
Using the test runner
Using pytest
~~~~~~~~~~~~~~~~~~~~~~

You can run unit tests for PyBaMM using

.. code:: bash
# in the PyBaMM/ directory
nox -s unit
pytest -m unit
The above starts a sub-process using the current python interpreter (i.e. using your current
Python environment) and run the unit tests. This can take a few minutes.
The above uses pytest (in your current
Python environment) to run the unit tests. This can take a few minutes.

You can also use the test runner to run the doctests:
You can also use pytest to run the doctests:

.. code:: bash
nox -s unit
pytest --doctest-plus src
There is more to the PyBaMM test runner. To see a list of all options, type

.. code:: bash
nox --list
Refer to the `testing <https://docs.pybamm.org/en/stable/source/user_guide/contributing.html#testing>`_ docs to find out more ways to test PyBaMM using pytest.

How to build the PyBaMM documentation
-------------------------------------
Expand Down

0 comments on commit 6a75ffa

Please sign in to comment.