Registry / testing / pytest-md

pytest-md

JSON →
library0.2.0pypypiunverified

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.

pip install pytest-md
INSTALL
IMPORT
SIG · PYTEST-MD
P
pytest-md
testingpythonv0.2.0
Install
2.7s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.7s · import 0.000s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest-md plugin
No direct Python import is typically needed; the plugin is loaded by pytest upon installation.
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.

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.

# tests/test_example.py import pytest import random def test_passed(): assert True def test_failed(): assert False @pytest.mark.skip(reason="demonstrating skip") def test_skipped(): assert True @pytest.mark.xfail(reason="demonstrating xfail") def test_xfail(): assert False @pytest.mark.xfail(reason="demonstrating xpass", strict=True) def test_xpass(): assert 0.0 < random.random() < 1.0 # This test will actually pass, but is marked xfail. def test_error_division_by_zero(): 1 / 0 # To generate a Markdown report, run pytest from your terminal: # pytest --md report.md
Debug
Known issues
gotchaVersion 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.
fix
Review generated reports from version 0.2.0 to ensure compatibility with any downstream parsing or reporting tools you use.
affects: <=0.1.1
gotchaAs 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.
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.
affects: All versions
gotchaBe 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.
fix
Carefully check the plugin name and documentation (`pytest-md` vs. `pytest-md-report`) to confirm you are using the intended tool.
affects: All versions
gotcha`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`.
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`).
affects: All versions
Upgrade
Version history
0.2.0latest on PyPI · released Jul 11, 2019
Audit
Dependencies
pytestrequiredCore dependency as pytest-md is a plugin for the pytest testing framework.
Agent activity
2 hits · last 30 days
node
2
Resources
pytest-md — pip install pytest-md · libregistry