{"id":16904551,"url":"https://github.com/hackebrot/pytest-md","last_synced_at":"2025-03-17T06:32:11.675Z","repository":{"id":60722814,"uuid":"171452791","full_name":"hackebrot/pytest-md","owner":"hackebrot","description":"Plugin for generating Markdown reports for pytest results 📝","archived":false,"fork":false,"pushed_at":"2020-07-16T08:20:53.000Z","size":45,"stargazers_count":41,"open_issues_count":8,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T09:12:54.719Z","etag":null,"topics":["markdown","pytest","pytest-plugin","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackebrot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-19T10:21:46.000Z","updated_at":"2025-03-02T03:09:49.000Z","dependencies_parsed_at":"2022-10-03T21:19:26.229Z","dependency_job_id":null,"html_url":"https://github.com/hackebrot/pytest-md","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackebrot%2Fpytest-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackebrot%2Fpytest-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackebrot%2Fpytest-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackebrot%2Fpytest-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackebrot","download_url":"https://codeload.github.com/hackebrot/pytest-md/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243986406,"owners_count":20379325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","pytest","pytest-plugin","python","python3"],"created_at":"2024-10-13T18:34:16.906Z","updated_at":"2025-03-17T06:32:11.117Z","avatar_url":"https://github.com/hackebrot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytest-md\n\nPlugin for generating Markdown reports for [pytest] results 📝\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 \u003c random.random() \u003c 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]* 📝\n\n[pytest-md]: https://github.com/hackebrot/pytest-md\n\n## Summary\n\n8 tests ran in 0.06 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]: https://github.com/hackebrot/pytest-emoji\n\n## Credits\n\nThis project is inspired by the fantastic [pytest-html] plugin! 💻\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! 😃\n\nPlease check out the [good first issue][good first issue] label for tasks,\nthat are good candidates for your first contribution to **pytest-md**. Your\ncontributions are greatly appreciated! Every little bit helps, and credit\nwill always be given.\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\nabide by its terms.\n\nJoin the pytest-md [community][community]! 🌍🌏🌎\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/COMMUNITY.md\n\n## License\n\nDistributed under the terms of the MIT license, **pytest-md** is free and open\nsource software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackebrot%2Fpytest-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackebrot%2Fpytest-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackebrot%2Fpytest-md/lists"}