You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytester: avoid unraisableexception gc collects in inline runs to speed up test suite
Because `pytester.runpytest()` executes the full session cycle (including
`pytest_unconfigure`), it was calling `gc.collect()` in a loop multiple
times—even for small, fast tests. This significantly increased the total
test suite runtime.
To optimize performance, disable the gc runs in inline pytester runs
entirely, matching the behavior before pytest-dev#12958.
Locally the test suite runtime improved dramatically, dropping from 425s
to 160s.
Fixespytest-dev#13482.
Co-authored-by: Bruno Oliveira <[email protected]>
0 commit comments