All Projects β†’ hackebrot β†’ pytest-emoji

hackebrot / pytest-emoji

Licence: MIT license
A pytest plugin that adds emojis to your test result report 😍

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to pytest-emoji

pytest-pycodestyle
pytest plugin to run pycodestyle
Stars: ✭ 15 (-63.41%)
Mutual labels:  pytest
emoji-sentiment
Emoji sentiment data
Stars: ✭ 14 (-65.85%)
Mutual labels:  emoji
ipython pytest
Pytest magic for IPython notebooks
Stars: ✭ 33 (-19.51%)
Mutual labels:  pytest
pytest-docker-tools
Opionated helpers for creating py.test fixtures for Docker integration and smoke testing environments
Stars: ✭ 61 (+48.78%)
Mutual labels:  pytest
react-native-emoji-input
A fully-featured emoji keyboard ⌨️ for React Native βš›οΈ
Stars: ✭ 67 (+63.41%)
Mutual labels:  emoji
pytest-subprocess
Pytest plugin to fake subprocess.
Stars: ✭ 83 (+102.44%)
Mutual labels:  pytest
QueerCats
A whole bunch of pride flags represented as blobby cat emoji
Stars: ✭ 72 (+75.61%)
Mutual labels:  emoji
pytest-csv
CSV reporter for pytest.
Stars: ✭ 16 (-60.98%)
Mutual labels:  pytest
ChineseBQB-client
🀣 εΌ€ζΊθ‘¨ζƒ…εŒ…ε°η¨‹εΊ
Stars: ✭ 81 (+97.56%)
Mutual labels:  emoji
scrift
New generation shell and scripting language for everyone.
Stars: ✭ 46 (+12.2%)
Mutual labels:  emoji
python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (+4.88%)
Mutual labels:  pytest
emoji-strip
Strip emoji from a string in Node.js and browsers.
Stars: ✭ 73 (+78.05%)
Mutual labels:  emoji
drf-chat-server-example
A chat server example used Django REST framework with pytest
Stars: ✭ 15 (-63.41%)
Mutual labels:  pytest
dvorakjp-romantable
Google ζ—₯本θͺžε…₯εŠ›η”¨DvorakJPγƒ­γƒΌγƒžε­—γƒ†γƒΌγƒ–γƒ« / DvorakJP Roman Table for Google Japanese Input
Stars: ✭ 43 (+4.88%)
Mutual labels:  emoji
EmojiAddIn
Emoji for Outlook and Thunderbird
Stars: ✭ 21 (-48.78%)
Mutual labels:  emoji
studio-log
πŸ‘» A tiny JSON logger with emoji support
Stars: ✭ 39 (-4.88%)
Mutual labels:  emoji
pytest-tap
Test Anything Protocol (TAP) reporting plugin for pytest
Stars: ✭ 34 (-17.07%)
Mutual labels:  pytest
vuemoji-picker
Vue 2 and 3 lightweight emoji picker.
Stars: ✭ 53 (+29.27%)
Mutual labels:  emoji
pytest-mongodb
pytest plugin for mocking MongoDB with fixtures
Stars: ✭ 56 (+36.59%)
Mutual labels:  pytest
publishing-python-packages
Examples and exercises for Publishing Python Packages from Manning Books 🐍 πŸ“¦ ⬆️
Stars: ✭ 25 (-39.02%)
Mutual labels:  pytest

pytest-emoji

A pytest plugin that adds emojis to your test result report 😍

pytest

pytest is a mature testing framework for Python that is developed by a thriving 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.

There are hundreds of plugins available for pytest with which you can extend and customize your testing harness. 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 to write more tests! 😁

This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template. πŸͺ

Installation

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 4.2.1 or higher.

Features

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/test_emoji.py πŸ˜ƒ 😰 😞 😲 πŸ™„ 😑

Verbose mode:

$ pytest --verbose --emoji
tests/test_emoji.py::test_passed PASSED πŸ˜ƒ
tests/test_emoji.py::test_failed FAILED 😰
tests/test_emoji.py::test_xfailed XFAIL 😞
tests/test_emoji.py::test_xpassed XPASS 😲
tests/test_emoji.py::test_skipped SKIPPED πŸ™„
tests/test_emoji.py::test_error ERROR 😑

Customization

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

Add a conftest.py 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 "πŸͺ ", "PASSED πŸͺ "


def pytest_emoji_failed(config):
    return "😿 ", "FAILED 😿 "


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


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


def pytest_emoji_xfailed(config):
    return "πŸ€“ ", "XFAIL πŸ€“ "


def pytest_emoji_xpassed(config):
    return "😜 ", "XPASS 😜 "

Naming the hooks correctly 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.

Community

Are you interested in contributing to pytest-emoji? Your contributions are greatly appreciated! Every little bit helps, and credit will always be given!

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.

Issues

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

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].