{"id":6440,"library":"pytest-md","title":"pytest-md","description":"pytest-md is a pytest plugin designed for generating Markdown reports from pytest test results. It is currently at version 0.2.0 and receives updates with a moderate release cadence, indicating active maintenance.","status":"active","version":"0.2.0","language":"en","source_language":"en","source_url":"https://github.com/hackebrot/pytest-md","tags":["pytest","testing","report","markdown","plugin"],"install":[{"cmd":"pip install pytest-md","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency as pytest-md is a plugin for the pytest testing framework.","package":"pytest","optional":false}],"imports":[{"note":"pytest-md is a pytest plugin that extends pytest's command-line interface. Users interact with it via pytest CLI flags, not by importing specific modules or classes in their test files.","symbol":"pytest-md plugin","correct":"No direct Python import is typically needed; the plugin is loaded by pytest upon installation."}],"quickstart":{"code":"# tests/test_example.py\nimport pytest\nimport random\n\ndef test_passed():\n    assert True\n\ndef test_failed():\n    assert False\n\n@pytest.mark.skip(reason=\"demonstrating skip\")\ndef test_skipped():\n    assert True\n\n@pytest.mark.xfail(reason=\"demonstrating xfail\")\ndef test_xfail():\n    assert False\n\n@pytest.mark.xfail(reason=\"demonstrating xpass\", strict=True)\ndef test_xpass():\n    assert 0.0 < random.random() < 1.0 # This test will actually pass, but is marked xfail.\n\ndef test_error_division_by_zero():\n    1 / 0\n\n# To generate a Markdown report, run pytest from your terminal:\n# pytest --md report.md","lang":"python","description":"After installing `pytest-md`, create some pytest tests. To generate a Markdown report, simply run pytest from your terminal with the `--md` flag, specifying the desired output file name. The report will be generated in the specified file."},"warnings":[{"fix":"Review generated reports from version 0.2.0 to ensure compatibility with any downstream parsing or reporting tools you use.","message":"Version 0.2.0 introduced the capability for 'individual test reports and errors'. While an enhancement, this change might alter the granular structure or content of the generated Markdown report compared to previous versions (e.g., 0.1.x), which could affect automated tools parsing these reports.","severity":"gotcha","affected_versions":"<=0.1.1"},{"fix":"Ensure the plugin is installed (`pip install pytest-md`) and then invoke pytest with the relevant command-line flags. Consult the official documentation for available options.","message":"As a pytest plugin, `pytest-md` automatically registers itself with pytest upon installation. Its primary functionality is exposed via command-line options (e.g., `--md report.md`) and does not typically require importing any symbols into your test files or Python code for basic usage.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Carefully check the plugin name and documentation (`pytest-md` vs. `pytest-md-report`) to confirm you are using the intended tool.","message":"Be aware of potential confusion with 'pytest-md-report', a separate plugin that also generates Markdown reports but often in a tabular format with different configuration options. Ensure you install and use the correct plugin for your desired report style and features.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If you want emoji support, run `pip install pytest-emoji` alongside `pytest-md`, and use the `--emoji` flag with pytest (e.g., `pytest --emoji --md report.md`).","message":"`pytest-md` can integrate with `pytest-emoji` for richer, emoji-laden reports. If you desire emojis in your Markdown output, `pytest-emoji` must be installed separately in addition to `pytest-md`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}