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

Commit

Permalink
Merge #33825
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 14, 2022
2 parents 21e06c5 + a2e396b commit 2ec0061
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/pytest/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) pluggy packaging attrs py pyparsing importlib_metadata | $(PYTHON_TOOLCHAIN)
$(PYTHON) pluggy packaging attrs py pyparsing importlib_metadata tomli | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
18 changes: 18 additions & 0 deletions build/pkgs/pytest_xdist/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pytest_xdist: pytest xdist plugin for distributed testing and loop-on-failing modes
===================================================================================

Description
-----------

pytest xdist plugin for distributed testing and loop-on-failing modes

License
-------

MIT

Upstream Contact
----------------

https://pypi.org/project/pytest-xdist/

4 changes: 4 additions & 0 deletions build/pkgs/pytest_xdist/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) pytest | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/pytest_xdist/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-xdist
1 change: 1 addition & 0 deletions build/pkgs/pytest_xdist/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-xdist
1 change: 1 addition & 0 deletions build/pkgs/pytest_xdist/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
9 changes: 7 additions & 2 deletions src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,18 @@ package :mod:`sage.numerical.backends` and some modules in

*Installation:*

- ``./sage -i pytest``.
- ``./sage -i pytest pytest_xdist``.

*Usage:*

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

- Manual: Run ``./sage -pytest path/to/the/test_file.py`` or ``./sage -pytest`` to run all tests.
- Manual: Run ``./sage -pytest path/to/the/test_file.py`` or ``./sage -pytest``
to run all tests. The additional argument ``-n`` can be used to
distribute tests across multiple CPUs to speed up test execution.
For example, ``./sage -pytest -n 4`` will run 4 tests in parallel, while
``./sage -pytest -n auto`` will spawn a number of workers processes equal
to the number of available CPUs.

- 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 2ec0061

Please sign in to comment.