--- id: pytest-only version: "2.1.2" license: MIT license_treatment: permissive maintenance: dormant --- # pytest-only — Use @pytest.mark.only to run a single test License: permissive · Maintenance: dormant · Downloads: 76.9K/mo ## 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 above — verify before relying. A pytest plugin that runs only tests marked with @pytest.mark.only, skipping all others unless the marker is disabled with --no-only. 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 pip install pytest-only uv add pytest-only poetry add pytest-only ## Installing pytest-only 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 - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 76.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest selective test execution, run only marked tests pytest, pytest focus single test, skip tests except marked, pytest.mark.only plugin, conditional test filtering pytest, test-filtering, development-workflow [View on SkillFed](https://skillfed.io/packages/pytest-only) · [View on PyPI](https://pypi.org/project/pytest-only/)