Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Self-Hosting & Infra

Find and Fix Flaky pytest Tests

Self-Hosting & Infra intermediate 7 min read $0.01 Updated 2026-10-19

Diagnosing flaky pytest tests: reproduction with pytest-randomly, pytest-repeat and xdist, shared global and database state, fixtures scope, time and randomness, network calls, async races, resource cleanup and quarantine policy.

Tests pass locally and fail in CI, or fail one run in ten. Reproduce with random order and repeats, then fix shared state, time, ordering, concurrency and external dependencies.

Read the full guide

The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.

Open in the Knowledge Base Agent API →