Skip to main content

pytest-collect-markers

A pytest plugin that collects test markers and outputs them to a JSON file.

Installation

pip install pytest-collect-markers

Usage

Run pytest with the --collect-markers flag to collect all markers from your tests:

pytest --collect-markers

This will create a markers.json file containing a mapping of test node IDs to their markers.

Options

Option Default Description
--collect-markers False Enable marker collection
--markers-output markers.json Output file path for collected markers

Example

pytest --collect-markers --markers-output=my-markers.json

Output Format

The output JSON file maps test node IDs to their list of markers:

{
  "tests/test_example.py::test_slow_operation": ["slow", "integration"],
  "tests/test_example.py::test_fast_unit": ["unit"]
}

Development

# Install with uv
uv sync

# Run tests
uv run pytest

License

MIT

Metadata

Release files for pytest-collect-markers 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-collect-markers 0.2.0
File Size Uploaded
pytest_collect_markers-0.2.0.tar.gz 1.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-collect-markers 0.2.0
File Interpreter ABI Platform
pytest_collect_markers-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 kB

Release files / pytest_collect_markers-0.2.0.tar.gz

Download URL pytest_collect_markers-0.2.0.tar.gz
Size 1.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e945c78136054cca8d1eb92902bf82963fbc36991df48d59ab3240b781ef487
BLAKE2b-256 checksum
How to use checksums
c776e5d616143ee568357f68c4c86669375afbff927469505ac53e3ce4dd1c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Release files / pytest_collect_markers-0.2.0-py3-none-any.whl

Download URL pytest_collect_markers-0.2.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68789261ae7861c228961145ddd23a65843e66a80ba5a110fde13012781ab18e
BLAKE2b-256 checksum
How to use checksums
3d0a5d91ff6221e7f8c69ef1670335f48dc3b02610ce655222d28fd4b149bd05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page