pytest-emoji


Namepytest-emoji JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/hackebrot/pytest-emoji
SummaryA pytest plugin that adds emojis to your test result report
upload_time2019-02-19 09:33:17
maintainerRaphael Pierzina
docs_urlNone
authorRaphael Pierzina
requires_python>=3.4
licenseMIT
keywords pytest emoji
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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][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][cookiecutter] along with
[@hackebrot][hackebrot]'s [cookiecutter-pytest-plugin][plugin-template]
template. 🍪

[cookiecutter]: https://github.com/audreyr/cookiecutter
[hackebrot]: https://github.com/hackebrot
[pytest]: https://github.com/pytest-dev/pytest
[plugin-template]: https://github.com/pytest-dev/cookiecutter-pytest-plugin

## Installation

**pytest-emoji** is available for Python 3. 🐍

You can install **pytest-emoji** via [pip][pip] from [PyPI][PyPI]:

```text
$ pip install pytest-emoji
```

This will automatically install **pytest** of version 4.2.1 or higher.

[pip]: https://pypi.python.org/pypi/pip/
[PyPI]: https://pypi.org/project/pytest-emoji/

## 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:

```text
$ pytest --emoji
```

```text
tests/test_emoji.py 😃 😰 😞 😲 🙄 😡
```

Verbose mode:

```text
$ pytest --verbose --emoji
```

```text
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.

```python
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][coc].


[coc]: https://www.pypa.io/en/latest/code-of-conduct/

## Issues

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

[issues]: https://github.com/hackebrot/pytest-emoji/issues

## License

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

[mit]: http://opensource.org/licenses/MIT



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hackebrot/pytest-emoji",
    "name": "pytest-emoji",
    "maintainer": "Raphael Pierzina",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "raphael@hackebrot.de",
    "keywords": "pytest,emoji",
    "author": "Raphael Pierzina",
    "author_email": "raphael@hackebrot.de",
    "download_url": "https://files.pythonhosted.org/packages/88/4d/d489f939f0717a034cea7955d36bc2a7a5ba1b263871e63ad8cb16d47555/pytest-emoji-0.2.0.tar.gz",
    "platform": "",
    "description": "# pytest-emoji\n\nA pytest plugin that adds emojis to your test result report \ud83d\ude0d\n\n## pytest\n\npytest is a mature testing framework for Python that is developed by a\nthriving community of volunteers. It uses plain assert statements and regular\nPython comparisons. Writing tests with pytest requires little to no\nboilerplate code and powerful features allow easy parametrization and\nintelligent test selection.\n\nThere are hundreds of plugins available for pytest with which you can extend\nand customize your testing harness. Distributed under the terms of the MIT\nlicense, pytest is free and open source software.\n\nCheck out [pytest][pytest] if you haven't already and if you're not sold just\nyet, install this plugin. Maybe that will get you motivated to write more\ntests! \ud83d\ude01\n\nThis pytest plugin was generated with [Cookiecutter][cookiecutter] along with\n[@hackebrot][hackebrot]'s [cookiecutter-pytest-plugin][plugin-template]\ntemplate. \ud83c\udf6a\n\n[cookiecutter]: https://github.com/audreyr/cookiecutter\n[hackebrot]: https://github.com/hackebrot\n[pytest]: https://github.com/pytest-dev/pytest\n[plugin-template]: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n\n## Installation\n\n**pytest-emoji** is available for Python 3. \ud83d\udc0d\n\nYou can install **pytest-emoji** via [pip][pip] from [PyPI][PyPI]:\n\n```text\n$ pip install pytest-emoji\n```\n\nThis will automatically install **pytest** of version 4.2.1 or higher.\n\n[pip]: https://pypi.python.org/pypi/pip/\n[PyPI]: https://pypi.org/project/pytest-emoji/\n\n## Features\n\nThis plugin adds a ``--emoji`` CLI flag to pytest, which replaces the test\nresult indicator to emojis, both for *normal* and *verbose* mode.\n\n- ``\ud83d\ude03 / PASSED \ud83d\ude03`` for passed tests\n- ``\ud83d\ude30 / FAILED \ud83d\ude30`` for failed tests\n- ``\ud83d\ude1e / XFAIL \ud83d\ude1e`` for xfailed tests\n- ``\ud83d\ude32 / XPASS \ud83d\ude32`` for xpassed tests\n- ``\ud83d\ude44 / SKIPPED \ud83d\ude44`` for skipped tests\n- ``\ud83d\ude21 / ERROR \ud83d\ude21`` for tests with errors\n\nNormal mode:\n\n```text\n$ pytest --emoji\n```\n\n```text\ntests/test_emoji.py \ud83d\ude03 \ud83d\ude30 \ud83d\ude1e \ud83d\ude32 \ud83d\ude44 \ud83d\ude21\n```\n\nVerbose mode:\n\n```text\n$ pytest --verbose --emoji\n```\n\n```text\ntests/test_emoji.py::test_passed PASSED \ud83d\ude03\ntests/test_emoji.py::test_failed FAILED \ud83d\ude30\ntests/test_emoji.py::test_xfailed XFAIL \ud83d\ude1e\ntests/test_emoji.py::test_xpassed XPASS \ud83d\ude32\ntests/test_emoji.py::test_skipped SKIPPED \ud83d\ude44\ntests/test_emoji.py::test_error ERROR \ud83d\ude21\n```\n\n## Customization\n\nYou can also change the emojis, if you want. \ud83d\ude1b\n\nAdd a ``conftest.py`` to your tests folder and implement the following hooks.\nIf you wish to use the default, omit the according hook.\n\n```python\ndef pytest_emoji_passed(config):\n    return \"\ud83c\udf6a \", \"PASSED \ud83c\udf6a \"\n\n\ndef pytest_emoji_failed(config):\n    return \"\ud83d\ude3f \", \"FAILED \ud83d\ude3f \"\n\n\ndef pytest_emoji_skipped(config):\n    return \"\ud83d\ude48 \", \"SKIPPED \ud83d\ude48 \"\n\n\ndef pytest_emoji_error(config):\n    return \"\ud83d\udca9 \", \"ERROR \ud83d\udca9 \"\n\n\ndef pytest_emoji_xfailed(config):\n    return \"\ud83e\udd13 \", \"XFAIL \ud83e\udd13 \"\n\n\ndef pytest_emoji_xpassed(config):\n    return \"\ud83d\ude1c \", \"XPASS \ud83d\ude1c \"\n```\n\n**Naming the hooks correctly is important, make sure you don't make any typos**\n\u26a0\ufe0f\n\nAll of these hooks receive the pytest ``config`` object, which allows you to\ncheck options and further customize the output. All hooks need to return a\ntuple of ``str`` as in ``(\"<shortletter>\", \"<verbose-word>\")``.\n\nIt's recommended for emoji to add an extra ``\" \"`` (blank) for better formatting.\n\n## Community\n\nAre you interested in contributing to **pytest-emoji**? Your contributions are\ngreatly appreciated! Every little bit helps, and credit will always be given!\n\nEveryone interacting in the **pytest-emoji** project's codebases, issue\ntrackers, chat rooms, and mailing lists is expected to follow the [PyPA Code\nof Conduct][coc].\n\n\n[coc]: https://www.pypa.io/en/latest/code-of-conduct/\n\n## Issues\n\nIf you encounter any problems, please [file an issue][issues] along with a\ndetailed description.\n\n[issues]: https://github.com/hackebrot/pytest-emoji/issues\n\n## License\n\nDistributed under the terms of the [MIT][mit] license, **pytest-emoji** is\nfree and open source software\n\n[mit]: http://opensource.org/licenses/MIT\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A pytest plugin that adds emojis to your test result report",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/hackebrot/pytest-emoji"
    },
    "split_keywords": [
        "pytest",
        "emoji"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f75180af966c0aded877da7577d21c4601ca98c6f603c6e6073ddea071af01ec",
                "md5": "bcd9169a33a5a11490b54a3c9b3d61ed",
                "sha256": "6e34ed21970fa4b80a56ad11417456bd873eb066c02315fe9df0fafe6d4d4436"
            },
            "downloads": -1,
            "filename": "pytest_emoji-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcd9169a33a5a11490b54a3c9b3d61ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.4",
            "size": 5664,
            "upload_time": "2019-02-19T09:33:15",
            "upload_time_iso_8601": "2019-02-19T09:33:15.771759Z",
            "url": "https://files.pythonhosted.org/packages/f7/51/80af966c0aded877da7577d21c4601ca98c6f603c6e6073ddea071af01ec/pytest_emoji-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "884dd489f939f0717a034cea7955d36bc2a7a5ba1b263871e63ad8cb16d47555",
                "md5": "21263d9b1733a09f2de0c36d3af148c7",
                "sha256": "e1bd4790d87649c2d09c272c88bdfc4d37c1cc7c7a46583087d7c510944571e8"
            },
            "downloads": -1,
            "filename": "pytest-emoji-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "21263d9b1733a09f2de0c36d3af148c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 6171,
            "upload_time": "2019-02-19T09:33:17",
            "upload_time_iso_8601": "2019-02-19T09:33:17.454063Z",
            "url": "https://files.pythonhosted.org/packages/88/4d/d489f939f0717a034cea7955d36bc2a7a5ba1b263871e63ad8cb16d47555/pytest-emoji-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-02-19 09:33:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hackebrot",
    "github_project": "pytest-emoji",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-emoji"
}
        
Elapsed time: 0.20428s