Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/doc/en/developer/tools.rst: Update section on pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 31, 2022
1 parent 05bc58f commit 8825079
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,18 @@ Pytest
It is included in the Sage distribution as an optional package.

Currently, Sage only makes very limited use of pytest, for testing the
package :mod:`sage.numerical.backends`.
package :mod:`sage.numerical.backends` and some modules in
:mod:`sage.manifolds`.

*Installation:*

- (for use with the Sage doctester:) ``./sage -i pytest``.

- (for manual use:) ``pip install -U pytest``, see `documentation <https://docs.pytest.org/en/stable/getting-started.html#installation-and-getting-started>`__ for details.
- ``./sage -i pytest``.

*Usage:*

- Tox, Sage doctester: At the end of ``./sage -t`` (or ``./sage --tox -e doctest``), Pytest is automatically invoked.

- Manual: Run ``pytest path/to/the/test_file.py`` or ``pytest`` to run all tests (from a virtual environment with the Sage library installed)
- Manual: Run ``./sage -pytest path/to/the/test_file.py`` or ``./sage -pytest`` to run all tests.

- VS Code: Install the `Python extension <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_ and follow the `offical VS Code documentation <https://code.visualstudio.com/docs/python/testing>`__.

Expand Down

0 comments on commit 8825079

Please sign in to comment.