Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.2.1 instead.

flakestat

Find flaky tests in any language. No SaaS, no account, no data leaving your machine.

A flaky test passes and fails randomly on the same code. flakestat tells you exactly which ones, ranked worst first.

flakestat hunt --runs 20 \
  --junit 'reports/junit-{run}.xml' \
  -- pytest -q --junitxml='reports/junit-{run}.xml'
VERDICT               SCORE  RUNS  PASS/FAIL  TEST
flaky                  0.62    20       14/6  tests.test_auth::test_refresh_token
consistently-failing   0.00    20       0/20  tests.test_billing::test_discount

1 flaky, 0 suspect, 1 consistently failing, 1 stable, 1 unscored (of 4 tests)

Install

pip install flakestat

This package downloads the prebuilt flakestat binary for your platform (macOS, Linux, Windows on x86_64/arm64) from GitHub Releases on first use. It has no Python dependencies, so it cannot interfere with your project's resolution.

Why the verdicts matter

Flakiness is inconsistency, not failure. A test that fails 100% of the time scores 1.0 on failure rate but isn't flaky — it's broken. flakestat scores state transitions (pass→fail→pass), so an always-failing test correctly scores zero and is reported separately as consistently-failing instead of being mixed in with real flakes.

Skipped tests are excluded rather than treated as passes, so @pytest.mark.skip never manufactures a phantom transition.

How it compares

pytest-rerunfailures and pytest-flakefinder retry tests so a run goes green. That hides the symptom. flakestat measures which tests are unreliable and by how much, so they can be fixed — and it works across every suite in a polyglot repo, not just the Python one.

Tracking over time

A burst proves flakiness exists. History measures it, and catches environment-dependent flakes a local burst never will.

flakestat ingest 'reports/**/*.xml'   # in CI, after tests
flakestat report --top 20
flakestat report --fail-on-flaky      # exit 1 to gate a pipeline

History lives in .flakestat/runs.ndjson — one JSON object per line. Commit it for shared team history, or keep it as a CI artifact.

Environment variables

Variable Effect
FLAKESTAT_BINARY Use this binary instead of downloading
FLAKESTAT_SKIP_DOWNLOAD Fail instead of downloading
FLAKESTAT_CACHE_DIR Where the binary is cached

Full documentation

https://github.com/rowhitswami/flakestat

MIT

Release files for flakestat 0.1.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 flakestat 0.1.0
File Size Uploaded
flakestat-0.1.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flakestat 0.1.0
File Interpreter ABI Platform
flakestat-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / flakestat-0.1.0.tar.gz

Download URL flakestat-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e42c28d548e213a1e35fc51fdbf0313f110a13d9edc30ed34cac6e390183a60e
BLAKE2b-256 checksum
How to use checksums
24e8cf379535c2df495014c1fd6da81f8a90a683461e84819610dadf61bdc616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release files / flakestat-0.1.0-py3-none-any.whl

Download URL flakestat-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78693ad1dcb8d090749606e3bbb6ce6063180cf49d3f83fea9c6d151a7717109
BLAKE2b-256 checksum
How to use checksums
cf695f8b3aa6f92100caf2e13f002cf5d8cca6afa74695d5ce2545af31e23506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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