aboutsummaryrefslogtreecommitdiffstats
path: root/tests/README.md
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-06-27 22:54:30 +0100
committerGravatar GitHub <[email protected]>2021-06-27 22:54:30 +0100
commit1b9035ca4b070aca33ea81173f89ae5cd56e7699 (patch)
treec08acc9e27620beabfd0d26d1f396bee4f5f0ca1 /tests/README.md
parentMerge pull request #1658 from python-discord/wookie184-voiceverify-alias (diff)
parentMerge branch 'main' into xdist (diff)
Merge pull request #1626 from python-discord/xdist
Diffstat (limited to 'tests/README.md')
-rw-r--r--tests/README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/README.md b/tests/README.md
index 1a17c09bd..0192f916e 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -11,10 +11,15 @@ We are using the following modules and packages for our unit tests:
- [unittest](https://docs.python.org/3/library/unittest.html) (standard library)
- [unittest.mock](https://docs.python.org/3/library/unittest.mock.html) (standard library)
- [coverage.py](https://coverage.readthedocs.io/en/stable/)
+- [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/index.html)
-To ensure the results you obtain on your personal machine are comparable to those generated in the CI, please make sure to run your tests with the virtual environment defined by our [Poetry Project](/pyproject.toml). To run your tests with `poetry`, we've provided two "scripts" shortcuts:
+We also use the following package as a test runner:
+- [pytest](https://docs.pytest.org/en/6.2.x/)
-- `poetry run task test` will run `unittest` with `coverage.py`
+To ensure the results you obtain on your personal machine are comparable to those generated in the CI, please make sure to run your tests with the virtual environment defined by our [Poetry Project](/pyproject.toml). To run your tests with `poetry`, we've provided the following "script" shortcuts:
+
+- `poetry run task test-nocov` will run `pytest`.
+- `poetry run task test` will run `pytest` with `pytest-cov`.
- `poetry run task test path/to/test.py` will run a specific test.
- `poetry run task report` will generate a coverage report of the tests you've run with `poetry run task test`. If you append the `-m` flag to this command, the report will include the lines and branches not covered by tests in addition to the test coverage report.