deselected
The count pytest reports for tests that were collected but left out of this run by a -k or -m selection.
In more detail
Deselected is different from skipped: the tests were never considered part of the run, so their result says nothing about them. The summary line reports them separately, for example 1 passed, 2 deselected.
Related terms
- pytest -k — The pytest option that runs only tests whose names match a substring or a small expression using and, or and not.
- marker — A label attached to a test with @pytest.mark.name so you can select, skip or configure tests by that label.
- skipped test — A test pytest deliberately did not run, because it was marked to skip or a condition such as a missing dependency applied.
Taught in
- The Test Pyramid And Where It Is Wrong — Automated Testing, TDD & Quality Engineering
- Introducing pytest — Automated Testing, TDD & Quality Engineering
- Naming Tests For Readability — Automated Testing, TDD & Quality Engineering