$npx skillfedfor your agent

pytest-only

Use @pytest.mark.only to run a single test

With conditionsPyPI TestingReleased May 202476.9K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_only-2.1.2-py3-none-any.whl
v2.1.2 · released 2024-05-27 · Python <4.0,>=3.8 · 1 runtime deps: pytest

Yes, if you use pytest and want a lightweight way to focus on individual tests during development. The plugin is stable, has no security vulnerabilities, and adds minimal friction (only pytest as a dependency). Dormant maintenance is not a concern for a narrow, stable tool, but verify compatibility with your pytest version if you run a very recent release.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with only pytest as a runtime dependency.
  • Maintenance is dormant (last release 2024-05-27, 809 days ago), but the package is marked Production/Stable and the repository is not archived, suggesting it remains functional for its narrow scope.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing unrestricted use, modification, and distribution in both open-source and commercial projects.

last release 2024-05-27 (809 days) · last repo commit 2025-01-13 · 19 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 76,871 downloads/mo, #14,585 on PyPI

Verify before relying

pip install pytest-only

import pytest

@pytest.mark.only
def test_focused():
    assert True

# Run with: pytest
  • Whether the plugin remains compatible with pytest versions released after 2024-05-27
  • Whether the bundled pylint checker (pytest_only.ext.pylint) is actively maintained
Same gist for agents: .md · .json

What it is and what it does

pytest-only is a pytest plugin that selectively runs only the tests you mark with @pytest.mark.only, skipping all unmarked tests in the same run. If no tests are marked, all tests run normally. You can apply the marker to individual test functions, entire test classes, or at the module level via pytestmark. The plugin also includes a pylint checker to warn against accidentally committing focused tests.

The package is a thin wrapper around pytest's marker system, designed for development workflows where you want to isolate a single test or a small subset without modifying your test suite structure. It borrows the concept from mocha's .only pattern and provides a --no-only flag to temporarily disable the filtering behavior.

Use it for

  • Isolate a failing test during debugging without commenting out or deleting other tests
  • Focus on a specific test class or module during active development
  • Temporarily run only new tests while implementing a feature, then remove the marker before commit
  • Use the bundled pylint plugin to catch stray @pytest.mark.only markers before they reach version control

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use pytest and want a lightweight way to focus on individual tests during development.

The plugin is stable, has no security vulnerabilities, and adds minimal friction (only pytest as a dependency). Dormant maintenance is not a concern for a narrow, stable tool, but verify compatibility with your pytest version if you run a very recent release.

Install

pytest-only on PyPI

Before you install

Low friction install with only pytest as a runtime dependency. Maintenance is dormant (last release 2024-05-27, 809 days ago), but the package is marked Production/Stable and the repository is not archived, suggesting it remains functional for its narrow scope.

License in practice

MIT license is permissive, allowing unrestricted use, modification, and distribution in both open-source and commercial projects.

Quickstart

pip install pytest-only

import pytest

@pytest.mark.only
def test_focused():
    assert True

# Run with: pytest

Verify before relying

  • Whether the plugin remains compatible with pytest versions released after 2024-05-27
  • Whether the bundled pylint checker (pytest_only.ext.pylint) is actively maintained

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceDormant 809 days since the last release
Last repo commit
First released
Downloads76,871 / month, #14,585 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Evidence: pytest_only-2.1.2-py3-none-any.whl

Tags

Capabilities
pytest selective test executionrun only marked tests pytestpytest focus single testskip tests except markedpytest.mark.only pluginconditional test filtering pytest
Topics
test-filteringdevelopment-workflow
PyPI keywords
pytest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “run only marked tests pytest”

  • pytest-onlyA pytest plugin that runs only tests marked with @pytest.mark.only,…
  • pytest-skip-slowA pytest plugin that skips tests marked with `@pytest.mark.slow` or…
  • pytest-error-for-skipsA pytest plugin that converts skipped tests into test failures,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-skip-slow · pytest-timestamper · pytest-skip-markers · pytest-picked · tavern · pytest-dependency · pytest-mpi · pytest-enabler · pytest-filter-subpackage · pytest-cache