Skip to main content

pytest runner and observer

Project description

pytest-fly

CI codecov PyPI Python License

pytest-fly aids the development, debug, and execution of complex code bases and test suites.

Features

  • Real-time monitoring of test execution in a GUI with six tabs:
    • Run — start/stop controls, run mode selection (Restart/Resume), pass rate, coverage percentage, elapsed time, and estimated time remaining
    • Graph — time-based progress chart showing each test module as a horizontal bar
    • Table — per-test status grid with elapsed time, peak CPU, memory usage, and individual coverage
    • Coverage — line chart of combined code coverage over time with covered/total line counts
    • Configuration — parallelism settings, refresh rate, and utilization thresholds
    • About — system and project information
  • Parallel test execution at the module level with configurable process count.
  • Resumable test execution — skip already-passed tests and only re-run failed or unrun tests.
  • Graceful interruption — stop the test suite and resume where it left off.
  • Per-process resource monitoring — tracks peak CPU and memory usage for each test module.
  • Estimated time remaining based on prior run durations, accounting for parallelism.
  • Code coverage tracking — each test writes its own coverage data, combined automatically as tests complete. The Coverage tab plots coverage over time, and the Table shows per-test coverage. Coverage persists across restarts so previously-passed tests contribute to the total.
  • Singleton test support via @pytest.mark.singleton — singleton tests run exclusively with no other tests executing concurrently.

Installation

You can install pytest-fly via pip from PyPI:

pip install pytest-fly

Parallelism

By default, pytest-fly executes modules (.py files) in parallel.

Functions inside a module are executed serially with respect to each other. No parallelism is performed for functions inside a module. For example, if a set of tests use a shared resource that does not support concurrent access, putting those tests in the same module ensures the tests do not conflict.

Modules can optionally be marked as a singleton via the @pytest.mark.singleton marker. When a singleton test runs, all other workers wait until it completes before starting new tests. This is enforced at runtime, not just by scheduling order.

In pytest terms, each module is run in a separate subprocess. Therefore, a pytest fixture with a session scope will actually be executed multiple times, once for each module.

Note that test concurrency in pytest-fly is different from pytest-xdist. group-by in pytest-xdist is analogous to putting the tests in the same module in pytest-fly.

Test Scheduling

pytest-fly orders tests to surface actionable information earlier:

  1. Tests that failed in the prior run are re-run first, so developers get faster feedback on tests they are likely fixing.
  2. When prior run data is available, tests with higher coverage efficiency (lines/second) are run earlier. This way, if there is a problem in the code, it is more likely to be found earlier in the test run.
  3. singleton tests are run last to maximize parallel throughput before exclusive execution begins.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_fly-0.3.33.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_fly-0.3.33-py3-none-any.whl (119.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_fly-0.3.33.tar.gz.

File metadata

  • Download URL: pytest_fly-0.3.33.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for pytest_fly-0.3.33.tar.gz
Algorithm Hash digest
SHA256 6bfc800879fe2ae1eddb2e993982893760d96a07d85ad2d451dd27e7a1fcfd8c
MD5 81688d45230fac891e14bae06e406f66
BLAKE2b-256 0d1001300bf2c91a67265de4ac92e471557d4fc2273b1b6ffe259d0d17b12be7

See more details on using hashes here.

File details

Details for the file pytest_fly-0.3.33-py3-none-any.whl.

File metadata

  • Download URL: pytest_fly-0.3.33-py3-none-any.whl
  • Upload date:
  • Size: 119.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for pytest_fly-0.3.33-py3-none-any.whl
Algorithm Hash digest
SHA256 4a836946382033de1b9a5aa069f81f6b39c050dc725bcfbc419e908f26be427d
MD5 7219b45d57d855de38b740dc879c1a1d
BLAKE2b-256 b9a137ba0b12a480e4b54921dc988aa64ba4babeea624baf823dcab281c7032f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page