Registry / testing / pytest-emoji

pytest-emoji

JSON →
library0.2.0pypypiunverified

pytest-emoji is a pytest plugin that enhances your test result reports by replacing standard indicators with expressive emojis. It offers clear visual feedback for passed, failed, skipped, xfailed, xpassed, and error states, making test output more engaging and easier to parse at a glance. The plugin is currently at version 0.2.0 and maintains a steady cadence as part of the pytest ecosystem.

pip install pytest-emoji
INSTALL
IMPORT
SIG · PYTEST-EMOJI
P
pytest-emoji
testingpythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Install the plugin, then simply run `pytest` with the `--emoji` flag to enable the emoji reporting. The plugin integrates seamlessly, replacing standard test indicators with emojis for both normal and verbose output modes.

# my_test_file.py def test_pass(): assert True def test_fail(): assert False # Run from your terminal: # pytest --emoji my_test_file.py # You should see: # my_test_file.py 😃 😰
Debug
Known issues
breakingThe global `pytest.config` object is deprecated for direct access within plugin hooks. Version 0.2.0 of `pytest-emoji` no longer uses it internally.
fix
If you have custom `pytest_emoji_*` hooks in your `conftest.py` that access `pytest.config`, modify them to accept `config` as an argument (e.g., `def pytest_emoji_passed(config):`). Access configuration attributes via this `config` argument.
affects: >= 0.2.0
gotchaEmojis might not display correctly in all terminal environments or on certain operating systems (e.g., older Windows consoles) due to font or encoding limitations.
fix
Ensure your terminal emulator supports Unicode and a font that includes emoji characters. Using a modern terminal like Windows Terminal, iTerm2, or setting your locale to a UTF-8 compatible one can resolve this. This is typically an environment configuration issue, not a `pytest-emoji` bug.
affects: All versions
Errors
Common errors & fixes
Emojis not appearing in test report output
The `--emoji` command-line flag was not provided when running pytest.
fix
Run pytest with the `--emoji` flag: `pytest --emoji` (for normal output) or `pytest --verbose --emoji` (for verbose output).
Custom `pytest_emoji_*` hooks in `conftest.py` raise `AttributeError` or other unexpected behavior related to `pytest.config` after `pytest-emoji` upgrade.
Your `conftest.py` might be attempting to access the global `pytest.config` object, which is no longer recommended and may lead to issues after `pytest-emoji` v0.2.0's internal changes.
fix
Update your custom `pytest_emoji_*` hooks to accept the `config` object as an argument and use that for configuration access. For example, change `def pytest_emoji_passed(): ...` to `def pytest_emoji_passed(config): ...`.
Upgrade
Version history
0.2.0latest on PyPI · released Feb 19, 2019
Audit
Dependencies
pytestrequiredRequired testing framework, automatically installed version >= 4.2.1.
Agent activity
2 hits · last 30 days
node
2
Resources
pytest-emoji — pip install pytest-emoji · libregistry