Skip to content

Commit

Permalink
get rid of reference to old test runner + update test instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Oct 2, 2024
1 parent 04f19ee commit f84ca7d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
40 changes: 33 additions & 7 deletions psutil/tests/README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
Instructions for running tests
==============================

* There are two ways of running tests. As a "user", if psutil is already
installed and you just want to test it works::
Setup:

.. code-block:: bash
make install-pydeps-test # install pytest
There are two ways of running tests. As a "user", if psutil is already
installed and you just want to test it works on your system:

.. code-block:: bash
python -m psutil.tests
As a "developer", if you have a copy of the source code and you wish to hack
on psutil::
As a "developer", if you have a copy of the source code and you're working on
it:

.. code-block:: bash
make test
You can run tests in parallel with:

.. code-block:: bash
make test-parallel
You can run a specific test with:

.. code-block:: bash
make test ARGS=psutil.tests.test_system.TestDiskAPIs
You can run memory leak tests with:

.. code-block:: bash
make install-pydeps # install missing third-party deps
make test # serial run
make test-parallel # parallel run
make test-parallel
4 changes: 2 additions & 2 deletions psutil/tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$ python -m psutil.tests.
"""

from .runner import main
import pytest


main()
pytest.main(["-v", "-s", "--tb=short"])

0 comments on commit f84ca7d

Please sign in to comment.