pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly).
Low maintenance activity. Last release 15 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install pytest-sugarpytest-sugar ✨
This plugin extends pytest by showing failures and errors instantly, adding a progress bar, improving the test results, and making the output look better.

Installation
To install pytest-sugar:
python -m pip install pytest-sugar
Once installed, the plugin is activated automatically. Run your tests normally:
pytest
If you would like more detailed output (one test per line), then you may use the verbose option:
pytest --verbose
If you would like to run tests without pytest-sugar, use:
pytest -p no:sugar
Usage
pytest-sugar provides several command-line options to customize its output and behavior. These options enhance test reporting and Playwright trace integration:
Show detailed test failures instead of one-line tracebacks. Use this if you want to see the full failure information instantly.
--old-summary
Force pytest-sugar output even if pytest doesn’t detect a real terminal. Useful when running tests in CI systems or other non-interactive environments.
--force-sugar
Specify the directory where Playwright trace files are stored. Defaults to Playwright default: "test-results"
--sugar-trace-dir <directory>
Disable Playwright trace file detection and output display. Use this if you want to turn off trace collection or display entirely.
--sugar-no-trace