pytest-md


Namepytest-md JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/hackebrot/pytest-md
SummaryPlugin for generating Markdown reports for pytest results
upload_time2019-07-11 08:15:59
maintainerRaphael Pierzina
docs_urlNone
authorRaphael Pierzina
requires_python>=3.6
licenseMIT
keywords pytest markdown
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-md

Plugin for generating Markdown reports for [pytest] results 📝

[pytest]: https://github.com/pytest-dev/pytest

## Installation

**pytest-md** is available on [PyPI][PyPI] for Python versions 3.6 and newer
and can be installed into your enviroment from your terminal via [pip][pip]:

```text
$ pip install pytest-md
```

[PyPI]: https://pypi.org/
[pip]: https://pypi.org/project/pip/

## Usage

The following example code produces all of the different pytest test outcomes.

```python
import random
import pytest


def test_failed():
    assert "emoji" == "hello world"


@pytest.mark.xfail
def test_xfailed():
    assert random.random() == 1.0


@pytest.mark.xfail
def test_xpassed():
    assert 0.0 < random.random() < 1.0


@pytest.mark.skip(reason="don't run this test")
def test_skipped():
    assert "pytest-emoji" != ""


@pytest.mark.parametrize(
    "name, expected",
    [
        ("Sara", "Hello Sara!"),
        ("Mat", "Hello Mat!"),
        ("Annie", "Hello Annie!"),
    ],
)
def test_passed(name, expected):
    assert f"Hello {name}!" == expected


@pytest.fixture
def number():
    return 1234 / 0


def test_error(number):
    assert number == number
```

With **pytest-md** installed, you can now generate a Markdown test report as
follows:

```text
$ pytest --md report.md
```

```Markdown
# Test Report

*Report generated on 25-Feb-2019 at 17:18:29 by [pytest-md]*

[pytest-md]: https://github.com/hackebrot/pytest-md

## Summary

8 tests ran in 0.05 seconds

- 1 failed
- 3 passed
- 1 skipped
- 1 xfailed
- 1 xpassed
- 1 error
```

## pytest-emoji

**pytest-md** also integrates with [pytest-emoji], which allows us to include
emojis in the generated Markdown test report:

```text
$ pytest --emoji -v --md report.md
```

```Markdown
# Test Report

*Report generated on 25-Feb-2019 at 17:18:29 by [pytest-md]* 📝

[pytest-md]: https://github.com/hackebrot/pytest-md

## Summary

8 tests ran in 0.06 seconds ⏱

- 1 failed 😰
- 3 passed 😃
- 1 skipped 🙄
- 1 xfailed 😞
- 1 xpassed 😲
- 1 error 😡
```

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

## Credits

This project is inspired by the fantastic [pytest-html] plugin! 💻

[pytest-html]: https://github.com/pytest-dev/pytest-html

## Community

Would you like to contribute to **pytest-md**? You're awesome! 😃

Please check out the [good first issue][good first issue] label for tasks, that
are good candidates for your first contribution to **pytest-md**. Your
contributions are greatly appreciated! Every little bit helps, and credit will
always be given! Find out who has already contributed to **pytest-md**
[here][community]!  🌍🌏🌎

Please note that **pytest-md** is released with a [Contributor Code of
Conduct][code of conduct]. By participating in this project you agree to abide
by its terms.

[good first issue]: https://github.com/hackebrot/pytest-md/labels/good%20first%20issue
[code of conduct]: https://github.com/hackebrot/pytest-md/blob/master/CODE_OF_CONDUCT.md
[community]: https://github.com/hackebrot/pytest-md/blob/master/CONTRIBUTORS.md

## License

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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hackebrot/pytest-md",
    "name": "pytest-md",
    "maintainer": "Raphael Pierzina",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "raphael@hackebrot.de",
    "keywords": "pytest,markdown",
    "author": "Raphael Pierzina",
    "author_email": "raphael@hackebrot.de",
    "download_url": "https://files.pythonhosted.org/packages/0e/55/1d4248f08a97255abb23b05d8ba07586333194fadb17beda96b707aebecd/pytest-md-0.2.0.tar.gz",
    "platform": "",
    "description": "# pytest-md\n\nPlugin for generating Markdown reports for [pytest] results \ud83d\udcdd\n\n[pytest]: https://github.com/pytest-dev/pytest\n\n## Installation\n\n**pytest-md** is available on [PyPI][PyPI] for Python versions 3.6 and newer\nand can be installed into your enviroment from your terminal via [pip][pip]:\n\n```text\n$ pip install pytest-md\n```\n\n[PyPI]: https://pypi.org/\n[pip]: https://pypi.org/project/pip/\n\n## Usage\n\nThe following example code produces all of the different pytest test outcomes.\n\n```python\nimport random\nimport pytest\n\n\ndef test_failed():\n    assert \"emoji\" == \"hello world\"\n\n\n@pytest.mark.xfail\ndef test_xfailed():\n    assert random.random() == 1.0\n\n\n@pytest.mark.xfail\ndef test_xpassed():\n    assert 0.0 < random.random() < 1.0\n\n\n@pytest.mark.skip(reason=\"don't run this test\")\ndef test_skipped():\n    assert \"pytest-emoji\" != \"\"\n\n\n@pytest.mark.parametrize(\n    \"name, expected\",\n    [\n        (\"Sara\", \"Hello Sara!\"),\n        (\"Mat\", \"Hello Mat!\"),\n        (\"Annie\", \"Hello Annie!\"),\n    ],\n)\ndef test_passed(name, expected):\n    assert f\"Hello {name}!\" == expected\n\n\n@pytest.fixture\ndef number():\n    return 1234 / 0\n\n\ndef test_error(number):\n    assert number == number\n```\n\nWith **pytest-md** installed, you can now generate a Markdown test report as\nfollows:\n\n```text\n$ pytest --md report.md\n```\n\n```Markdown\n# Test Report\n\n*Report generated on 25-Feb-2019 at 17:18:29 by [pytest-md]*\n\n[pytest-md]: https://github.com/hackebrot/pytest-md\n\n## Summary\n\n8 tests ran in 0.05 seconds\n\n- 1 failed\n- 3 passed\n- 1 skipped\n- 1 xfailed\n- 1 xpassed\n- 1 error\n```\n\n## pytest-emoji\n\n**pytest-md** also integrates with [pytest-emoji], which allows us to include\nemojis in the generated Markdown test report:\n\n```text\n$ pytest --emoji -v --md report.md\n```\n\n```Markdown\n# Test Report\n\n*Report generated on 25-Feb-2019 at 17:18:29 by [pytest-md]* \ud83d\udcdd\n\n[pytest-md]: https://github.com/hackebrot/pytest-md\n\n## Summary\n\n8 tests ran in 0.06 seconds \u23f1\n\n- 1 failed \ud83d\ude30\n- 3 passed \ud83d\ude03\n- 1 skipped \ud83d\ude44\n- 1 xfailed \ud83d\ude1e\n- 1 xpassed \ud83d\ude32\n- 1 error \ud83d\ude21\n```\n\n[pytest-emoji]: https://github.com/hackebrot/pytest-emoji\n\n## Credits\n\nThis project is inspired by the fantastic [pytest-html] plugin! \ud83d\udcbb\n\n[pytest-html]: https://github.com/pytest-dev/pytest-html\n\n## Community\n\nWould you like to contribute to **pytest-md**? You're awesome! \ud83d\ude03\n\nPlease check out the [good first issue][good first issue] label for tasks, that\nare good candidates for your first contribution to **pytest-md**. Your\ncontributions are greatly appreciated! Every little bit helps, and credit will\nalways be given! Find out who has already contributed to **pytest-md**\n[here][community]!  \ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\n\nPlease note that **pytest-md** is released with a [Contributor Code of\nConduct][code of conduct]. By participating in this project you agree to abide\nby its terms.\n\n[good first issue]: https://github.com/hackebrot/pytest-md/labels/good%20first%20issue\n[code of conduct]: https://github.com/hackebrot/pytest-md/blob/master/CODE_OF_CONDUCT.md\n[community]: https://github.com/hackebrot/pytest-md/blob/master/CONTRIBUTORS.md\n\n## License\n\nDistributed under the terms of the MIT license, **pytest-md** is free and open\nsource software.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Plugin for generating Markdown reports for pytest results",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/hackebrot/pytest-md"
    },
    "split_keywords": [
        "pytest",
        "markdown"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "807123d03f57c18116c6770141478e33b3500c4e92500cf4b49a396e9226733f",
                "md5": "ef792d8148ae1660492c8ed53fdb340e",
                "sha256": "4c4cd16fea6d1485e87ee254558712c804a96d2aa9674b780e7eb8fb6526e1d1"
            },
            "downloads": -1,
            "filename": "pytest_md-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef792d8148ae1660492c8ed53fdb340e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6117,
            "upload_time": "2019-07-11T08:15:57",
            "upload_time_iso_8601": "2019-07-11T08:15:57.829573Z",
            "url": "https://files.pythonhosted.org/packages/80/71/23d03f57c18116c6770141478e33b3500c4e92500cf4b49a396e9226733f/pytest_md-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e551d4248f08a97255abb23b05d8ba07586333194fadb17beda96b707aebecd",
                "md5": "98f164541200185558757a879458129e",
                "sha256": "3b248d5b360ea5198e05b4f49c7442234812809a63137ec6cdd3643a40cf0112"
            },
            "downloads": -1,
            "filename": "pytest-md-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "98f164541200185558757a879458129e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5985,
            "upload_time": "2019-07-11T08:15:59",
            "upload_time_iso_8601": "2019-07-11T08:15:59.687615Z",
            "url": "https://files.pythonhosted.org/packages/0e/55/1d4248f08a97255abb23b05d8ba07586333194fadb17beda96b707aebecd/pytest-md-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-07-11 08:15:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hackebrot",
    "github_project": "pytest-md",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-md"
}
        
Elapsed time: 0.25157s