Skip to content

Commit

Permalink
Removing run-tests.py mentions (#4628)
Browse files Browse the repository at this point in the history
* Removing mentions of run-tests.py

Signed-off-by: Pradyot Ranjan <[email protected]>

* Usin pytest instead of run-tests mentions

Signed-off-by: Pradyot Ranjan <[email protected]>

---------

Signed-off-by: Pradyot Ranjan <[email protected]>
Co-authored-by: Pradyot Ranjan <[email protected]>
Co-authored-by: Eric G. Kratz <[email protected]>
  • Loading branch information
3 people authored Nov 28, 2024
1 parent a9ceff9 commit ad3a3fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Please add a line in the relevant section of [CHANGELOG.md](https://github.com/p
# Key checklist:

- [ ] No style issues: `$ pre-commit run` (or `$ nox -s pre-commit`) (see [CONTRIBUTING.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#installing-and-using-pre-commit) for how to set this up to run automatically when committing locally, in just two lines of code)
- [ ] All tests pass: `$ python run-tests.py --all` (or `$ nox -s tests`)
- [ ] The documentation builds: `$ python run-tests.py --doctest` (or `$ nox -s doctests`)
- [ ] All tests pass: `$ python -m pytest` (or `$ nox -s tests`)
- [ ] The documentation builds: `$ python -m pytest --doctest-plus src` (or `$ nox -s doctests`)

You can run integration tests, unit tests, and doctests together at once, using `$ python run-tests.py --quick` (or `$ nox -s quick`).
You can run integration tests, unit tests, and doctests together at once, using `$ nox -s quick`.

## Further checks:

Expand Down
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
python run-tests.py --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
python run-tests.py --doctest
pytest --doctest-plus src
There is more to the PyBaMM test runner. To see a list of all options, type

.. code:: bash
python run-tests.py --help
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 ad3a3fe

Please sign in to comment.