Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

pytest + emoji

Project Description

pytest + emoji == 😍

Do you find writing tests tedious or boring? It can be - but it doesn’t need to be.


pytest is a mature testing framework for Python that is developed by a thriving and ever-growing community of volunteers. It uses plain assert statements and regular Python comparisons. Writing tests with pytest requires little to no boilerplate code and powerful features allow easy parametrization and intelligent test selection.

It can be easily extended and has hundreds of plugins available. Distributed under the terms of the MIT license, pytest is free and open source software.

Check out pytest if you haven’t already and if you’re not sold just yet, install this plugin. Maybe that will get you motivated 😁

This pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.


pytest-emoji is available for Python 3. 🐍

You can install pytest-emoji via pip from PyPI:

$ pip install pytest-emoji

This will automatically install pytest of version 3.0.1 or higher.


This plugin adds a --emoji CLI flag to pytest, which replaces the test result indicator to emojis, both for normal and verbose mode.

  • πŸ˜ƒ / PASSED πŸ˜ƒ for passed tests
  • 😰 / FAILED 😰 for failed tests
  • 😞 / xfail 😞 for xfailed tests
  • 😲 / XPASS 😲 for xpassed tests
  • πŸ™„ / SKIPPED πŸ™„ for skipped tests
  • 😑 / ERROR 😑 for tests with errors

Normal mode:

$ pytest --emoji
tests/ πŸ˜ƒ 😰 😞 😲 πŸ™„ 😑

Verbose mode:

$ pytest --verbose --emoji
tests/ PASSED πŸ˜ƒ
tests/ FAILED 😰
tests/ xfail 😞
tests/ XPASS 😲
tests/ SKIPPED πŸ™„
tests/ ERROR 😑


You can also change the emojis, if you want. πŸ˜›

Add a to your tests folder and implement the following hooks. If you wish to use the default, omit the according hook.

def pytest_emoji_passed(config):
    return u'πŸͺ ', u'PASSED πŸͺ '

def pytest_emoji_failed(config):
    return u'😿 ', u'FAILED 😿 '

def pytest_emoji_skipped(config):
    return u'πŸ™ˆ ', u'SKIPPED πŸ™ˆ '

def pytest_emoji_error(config):
    return u'πŸ’© ', u'ERROR πŸ’© '

def pytest_emoji_xfailed(config):
    return u'πŸ€“ ', u'xfail πŸ€“ '

def pytest_emoji_xpassed(config):
    return u'😜 ', u'XPASS 😜 '

Naming is important, make sure you don’t make any typos!

All of these hooks receive the pytest config object, which allows you to check options and further customize the output. All hooks need to return a tuple of str as in ('<shortletter>', '<verbose-word>').

It’s recommended for emoji to add an extra ' ' (blank) for better formatting.


Contributions are very welcome. Tests can be run with tox.


Distributed under the terms of the MIT license, pytest-emoji is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

Code of Conduct

Everyone interacting in the pytest-emoji project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(8.0 kB) Copy SHA256 Hash SHA256
Wheel py3 Aug 26, 2016
(6.4 kB) Copy SHA256 Hash SHA256
Source None Aug 26, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting