summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.rst
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-01-11 14:16:18 +0000
committerAngelos Evripiotis <angelos.evripiotis@gmail.com>2019-01-11 16:45:00 +0000
commitf86b7ff3aa2bbc4a56d4f1fcc02ed1c55b3e0dc5 (patch)
treed0e7cc59078a4dbc2e4756b4f78fed6bf502a604 /CONTRIBUTING.rst
parentfc3dcec83b8e7bc05699639ae7514d1765d616fc (diff)
downloadbuildstream-f86b7ff3aa2bbc4a56d4f1fcc02ed1c55b3e0dc5.tar.gz
contributing: '--last-failed' and '--no-cov' tips
To help new folks get to grips with pytest, add some tips on other frequently used features.
Diffstat (limited to 'CONTRIBUTING.rst')
-rw-r--r--CONTRIBUTING.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 7ae1dd0ef..b6ceeb49e 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1534,6 +1534,10 @@ You can always abort on the first failure by running::
tox -- -x
+Similarly, you may also be interested in the ``--last-failed`` and
+``--failed-first`` options as per the
+`pytest cache <https://docs.pytest.org/en/latest/cache.html>`_ documentation.
+
If you want to run a specific test or a group of tests, you
can specify a prefix to match. E.g. if you want to run all of
the frontend tests you can do::
@@ -1545,6 +1549,12 @@ If you wanted to run the test_build_track test within frontend/buildtrack.py you
tox -- tests/frontend/buildtrack.py::test_build_track
+When running only a few tests, you may find the coverage and timing output
+excessive, there are options to trim them. Note that coverage step will fail.
+Here is an example::
+
+ tox -- --no-cov --durations=1 tests/frontend/buildtrack.py::test_build_track
+
We also have a set of slow integration tests that are disabled by
default - you will notice most of them marked with SKIP in the pytest
output. To run them, you can use::