Registry / testing / pytest-testdox

pytest-testdox

JSON →
library3.1.0pypypi✓ verified 82d ago

A pytest plugin that formats test output in a testdox style, presenting test method names as human-readable sentences. Version 3.1.0 supports Python >=3.7 and is actively maintained. Releases are occasional, roughly annually.

pip install pytest-testdox
INSTALL
IMPORT
SIG · PYTEST-TESTDOX
P
pytest-testdox
testingpythonv3.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest_testdox
import pytest_testdox
import pytest

Enable testdox output by passing --testdox flag to pytest.

# Write a test file test_example.py and run with: # pytest --testdox class TestCalculator: def test_addition_returns_sum(self): assert 1 + 1 == 2 def test_subtraction_returns_difference(self): assert 5 - 3 == 2
Debug
Known issues
gotchapytest-testdox only formats output when the --testdox flag is passed. Without the flag, default pytest output is used.
fix
Run pytest with --testdox or add 'addopts = --testdox' in pytest.ini or pyproject.toml.
affects: all
breakingVersion 3.0.0 dropped support for Python 3.5 and 3.6. If your project uses those Python versions, pin to 2.x.
fix
Upgrade to Python 3.7+ or use pip install 'pytest-testdox<3'.
affects: >=3.0.0
deprecatedThe --testdox-format and --testdox-method-in-test-prefix options are deprecated since version 3.0.0 and will be removed in a future release.
fix
Use --tb=short or --tb=long for output control; avoid these deprecated flags.
affects: >=3.0.0
Upgrade
Version history
3.1.0latest on PyPI · released Jul 22, 2023
Audit
Dependencies
pytestrequiredPlugin requires pytest to run
Agent activity
12 hits · last 30 days
node
12
Resources
pytest-testdox — pip install pytest-testdox · libregistry