Registry / testing / pytest-custom-report

pytest-custom-report

JSON →
library1.0.1pypypi✓ verified 86d ago

A pytest plugin to configure the symbols displayed for test outcomes (e.g., . and F). Version 1.0.1 supports pytest 4.2.0+, where xfail was renamed to XFAIL. Low-maintenance library with no recent releases.

pip install pytest-custom-report
INSTALL
IMPORT
SIG · PYTEST-CUSTOM-REPO
P
pytest-custom-report
testingpythonv1.0.1
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
import pytest
Plugin is auto-discovered, no explicit import needed

Define a pytest_custom_report hook in conftest.py to override default symbols.

# conftest.py import pytest def pytest_custom_report(short, long): # Customize symbols return { 'PASSED': short and '.' or 'PASS', 'FAILED': short and 'F' or 'FAIL', }
Debug
Known issues
breakingRenamed 'xfail' to 'XFAIL' in default output to match pytest v4.2.0. This changes the default symbols for expected failures.
fix
If you relied on the old 'xfail' symbol, update your custom report or accept the new default 'XFAIL'.
affects: v1.0.0 -> v1.0.1
gotchaThe plugin does not support per-test symbols; the hook function receives 'short' and 'long' booleans that determine the detail level, not individual test names.
fix
Implement your own per-test logic if needed by inspecting the test item (not directly supported).
affects: all
deprecatedThe plugin is not actively maintained; no commits since 2019. It may break with future pytest versions.
fix
Consider alternatives like pytest-custom-report or maintaining a fork.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pytest_custom_report'
Plugin not installed in the current environment.
fix
Run 'pip install pytest-custom-report'
pytest: error: unrecognized arguments: --custom-report
The plugin does not define any command-line flags; configuration is done via the hook function.
fix
Remove any --custom-report arguments and define the pytest_custom_report hook in conftest.py.
Failed: could not create report: 'PASSED'
Return value from pytest_custom_report must be a dict with keys matching the standard outcomes (e.g., 'PASSED', 'FAILED').
fix
Ensure your hook returns a dict with correct outcome keys.
Upgrade
Version history
1.0.1latest on PyPI · released Jan 30, 2019
Audit
Dependencies
pytestrequiredPlugin requires pytest to run
Agent activity
2 hits · last 30 days
node
2
Resources
pytest-custom-report — pip install pytest-custom-report · libregistry