{"id":7613,"library":"pytest-emoji","title":"pytest-emoji","description":"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.","status":"active","version":"0.2.0","language":"en","source_language":"en","source_url":"https://github.com/hackebrot/pytest-emoji","tags":["pytest","testing","plugin","emoji","developer-tool"],"install":[{"cmd":"pip install pytest-emoji","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required testing framework, automatically installed version >= 4.2.1.","package":"pytest"}],"imports":[],"quickstart":{"code":"# my_test_file.py\ndef test_pass():\n    assert True\n\ndef test_fail():\n    assert False\n\n# Run from your terminal:\n# pytest --emoji my_test_file.py\n# You should see:\n# my_test_file.py 😃 😰","lang":"python","description":"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."},"warnings":[{"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.","message":"The global `pytest.config` object is deprecated for direct access within plugin hooks. Version 0.2.0 of `pytest-emoji` no longer uses it internally.","severity":"breaking","affected_versions":">= 0.2.0"},{"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.","message":"Emojis might not display correctly in all terminal environments or on certain operating systems (e.g., older Windows consoles) due to font or encoding limitations.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run pytest with the `--emoji` flag: `pytest --emoji` (for normal output) or `pytest --verbose --emoji` (for verbose output).","cause":"The `--emoji` command-line flag was not provided when running pytest.","error":"Emojis not appearing in test report output"},{"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): ...`.","cause":"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.","error":"Custom `pytest_emoji_*` hooks in `conftest.py` raise `AttributeError` or other unexpected behavior related to `pytest.config` after `pytest-emoji` upgrade."}]}