$npx skillfedfor your agent

detect-test-pollution

a tool to detect test pollution

Worth itPyPI TestingReleased Sep 2023324.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — detect_test_pollution-1.2.0-py2.py3-none-any.whl
v1.2.0 · released 2023-09-28 · Python >=3.8

Yes. If you maintain a pytest suite and have encountered flaky tests or test-order sensitivity, this tool directly solves a hard debugging problem with low friction and no dependencies. Even if you haven't hit the problem yet, it's lightweight enough to keep on hand. No security concerns, active maintenance, and permissive license.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires pytest to be installed and your tests to be runnable via pytest; requires Python >=3.8.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained as of July 2026 with 205 repository stars.

License · maintenance · safety

MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2023-09-28 (1051 days) · last repo commit 2026-07-15 · 205 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 324,318 downloads/mo, #7,596 on PyPI

Verify before relying

pip install detect-test-pollution

detect-test-pollution \
    --failing-test test.py::test_id_here \
    --tests ./tests
  • Effectiveness on very large test suites (thousands of tests) and whether bisection time remains practical.
  • Whether the tool handles parametrized tests, fixtures with side effects, or async test pollution.
  • Support for pytest plugins that affect test ordering or isolation (e.g., pytest-xdist in worker mode).
Same gist for agents: .md · .json

What it is and what it does

detect-test-pollution is a command-line tool that finds which test is polluting another test when test order matters. Test pollution occurs when a test fails mysteriously in one order but passes when run alone—a common flake symptom. The tool works by bisecting your test suite: given a failing test, it repeatedly runs subsets of your other tests alongside it to narrow down which test causes the failure. It supports two modes: normal detection (when you've identified a failing test) and fuzzing (shuffling tests until a failure appears, then finding its cause).

The tool is pytest-specific and requires your tests to be discoverable and runnable via pytest. It has no runtime dependencies beyond Python itself, making installation and setup straightforward. Bisection typically completes in logarithmic steps relative to your test count, so even large suites can be debugged in reasonable time.

Use it for

  • Isolate the root cause of a flaky test that fails in CI but passes locally or when run in isolation.
  • Debug test suites where pytest-randomly or pytest-xdist expose hidden test interdependencies.
  • Fuzz a test suite to discover latent pollution before it causes production issues.
  • Identify global state mutations (module-level variables, mocked objects, database state) left behind by tests.
  • Refactor or split a monolithic test file by finding which tests depend on execution order.

Worth the install?

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

Worth it

Yes.

If you maintain a pytest suite and have encountered flaky tests or test-order sensitivity, this tool directly solves a hard debugging problem with low friction and no dependencies. Even if you haven't hit the problem yet, it's lightweight enough to keep on hand. No security concerns, active maintenance, and permissive license.

Install

detect-test-pollution on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of July 2026 with 205 repository stars.

Requires pytest to be installed and your tests to be runnable via pytest; requires Python >=3.8.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install detect-test-pollution

detect-test-pollution \
    --failing-test test.py::test_id_here \
    --tests ./tests

Verify before relying

  • Effectiveness on very large test suites (thousands of tests) and whether bisection time remains practical.
  • Whether the tool handles parametrized tests, fixtures with side effects, or async test pollution.
  • Support for pytest plugins that affect test ordering or isolation (e.g., pytest-xdist in worker mode).

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 1,051 days since the last release
Last repo commit
First released
Downloads324,318 / month, #7,596 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: detect_test_pollution-1.2.0-py2.py3-none-any.whl

Tags

Capabilities
test pollution detectionfind flaky test causestest isolation debuggingpytest test dependenciestest order sensitivitybisect failing teststest side effects finder
Topics
pytest-plugintest-debuggingflaky-tests

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 › “test pollution detection”

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 lib-detect-testenv · pytest-find-dependencies · pytest-sentry · pytest-retry · pytest-antilru · pytest-flakefinder · pytest-pretty · pytest-assume · pytest-ruff · pylint-pytest