# Feature catalog — pytest-dev/pytest

> Canonical page: https://codevetter.com/unpack/pytest/feature-catalog

# Feature catalog — pytest-dev/pytest

Scanned commit 2887015cade4757385308e7a7d8083557fc637e2 (2026-09-29). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The primary user experience is selecting tests, discovering executable items, and receiving diagnostic reports. Fixtures and parametrization support reusable resources and generated test cases. Built-in integrations cover unittest, doctests, capture, logging, subtests, and machine-readable output. This catalog groups inspected capabilities into eight areas; it is bounded rather than an exhaustive listing of every CLI option.
- Users can run tests through pytest.main(args, plugins), while --collect-only skips execution after collection and collection errors stop the loop unless continuation is enabled. — [src/_pytest/config/__init__.py#L212-L229](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/config/__init__.py#L212-L229) [src/_pytest/main.py#L400-L416](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/main.py#L400-L416)
- Python discovery selects .py modules using python_files unless explicitly selected, creates Class or Function nodes, and expands parametrized calls through pytest_generate_tests and Metafunc. — [src/_pytest/python.py#L215-L270](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/python.py#L215-L270) [src/_pytest/python.py#L471-L518](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/python.py#L471-L518)
- -k evaluates case-insensitive substring matches across collected names and extra keywords; -m evaluates marker expressions, including matching marker keyword arguments. — [src/_pytest/mark/__init__.py#L185-L245](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/mark/__init__.py#L185-L245) [src/_pytest/mark/__init__.py#L259-L290](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/mark/__init__.py#L259-L290)
- Fixtures support cached resource reuse, dependency-aware finalization, yield-based teardown, and monkeypatch operations that are undone after the requesting test or fixture finishes. — [src/_pytest/fixtures.py#L1231-L1297](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/fixtures.py#L1231-L1297) [src/_pytest/fixtures.py#L1051-L1084](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/fixtures.py#L1051-L1084) [src/_pytest/monkeypatch.py#L36-L62](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/monkeypatch.py#L36-L62)
- Assertion rewriting compiles transformed test ASTs for detailed failures; public helpers include approx, raises, RaisesGroup, warns, and deprecated_call, while skip and xfail marks alter setup and reporting. — [src/_pytest/assertion/rewrite.py#L336-L344](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/assertion/rewrite.py#L336-L344) [src/pytest/__init__.py#L9-L11](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/pytest/__init__.py#L9-L11) [src/pytest/__init__.py#L65-L70](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/pytest/__init__.py#L65-L70) [src/_pytest/skipping.py#L247-L307](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/skipping.py#L247-L307)
- Capture supports fd, sys, no, and tee-sys modes with -s disabling capture; caplog exposes messages, formatted text, LogRecord objects, tuples, and clearing. — [src/_pytest/capture.py#L49-L65](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/capture.py#L49-L65) [src/_pytest/logging.py#L614-L627](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/logging.py#L614-L627)
- Built-in collection recognizes concrete unittest.TestCase subclasses and doctests from modules or text files; subtests.test provides individual reporting inside a test function. — [src/_pytest/unittest.py#L59-L82](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/unittest.py#L59-L82) [src/_pytest/doctest.py#L127-L153](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/doctest.py#L127-L153) [src/_pytest/subtests.py#L162-L194](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/subtests.py#L162-L194)
- Run management includes last-failed filtering, failed-first ordering, cache inspection, and stepwise continuation; reporting includes terminal status output, JUnit XML, and opt-in pastebin publication. — [src/_pytest/cacheprovider.py#L387-L426](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/cacheprovider.py#L387-L426) [src/_pytest/cacheprovider.py#L555-L559](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/cacheprovider.py#L555-L559) [src/_pytest/stepwise.py#L153-L190](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/stepwise.py#L153-L190) [src/_pytest/junitxml.py#L433-L446](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/junitxml.py#L433-L446) [src/_pytest/pastebin.py#L22-L31](https://github.com/pytest-dev/pytest/blob/2887015cade4757385308e7a7d8083557fc637e2/src/_pytest/pastebin.py#L22-L31)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
