Skip to content
rpytest GitHub

Home / Use cases / Large suites with heavy plugins

Scale

Large suites with heavy plugins

Amortise expensive collection and plugin import once per session for suites where collection dominates wall clock.

The problem

On a big suite with a non-trivial plugin graph — pytest-django, pytest-cov, hypothesis, and friends — the collection phase and plugin import can visibly dominate wall clock. Every invocation re-imports the same plugins and re-walks the same test tree before anything runs.

How rpytest solves it

large-suite reruns
$ rpytest            # first run: collect once
$ rpytest -k billing  # RPC into warm daemon, no re-collect
1 240 selected, 1 240 passed in 6.2s

Questions

+ Will a plugin that holds module-level state break under the daemon?

It can, if the plugin assumes a fresh process each run. That is exactly the class of difference --verify-dropin surfaces — it reports which tests disagree and whether the disagreement is at collection or execution time.

+ Does the daemon notice when I edit a test file?

Watch mode re-runs affected tests on change, and the daemon re-collects when the suite changes. For long-running sessions you can restart it with rpytest --daemon-stop if you want a guaranteed clean import.

Swap it in on your own suite