diff options
author | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-01-11 17:19:06 +0000 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-01-11 17:19:06 +0000 |
commit | d983f23137e0a1ec79ebff21e6c10868f1aab021 (patch) | |
tree | d0e7cc59078a4dbc2e4756b4f78fed6bf502a604 | |
parent | 276b8d48061068b4ebf525b0fe192c7eba332c3b (diff) | |
parent | f86b7ff3aa2bbc4a56d4f1fcc02ed1c55b3e0dc5 (diff) | |
download | buildstream-d983f23137e0a1ec79ebff21e6c10868f1aab021.tar.gz |
Merge branch 'aevri/tox_no_cov' into 'master'
pytest-cov==2.6.1, contributing: '--last-failed' and '--no-cov' tips
See merge request BuildStream/buildstream!1059
-rw-r--r-- | CONTRIBUTING.rst | 10 | ||||
-rw-r--r-- | requirements/dev-requirements.txt | 2 |
2 files changed, 11 insertions, 1 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:: diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index d706bc9f5..c34f6db12 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -2,7 +2,7 @@ coverage==4.4 pylint==2.2.2 pycodestyle==2.4.0 pytest==4.0.2 -pytest-cov==2.6.0 +pytest-cov==2.6.1 pytest-datafiles==2.0 pytest-env==0.6.2 pytest-xdist==1.25.0 |