Open
Description
Versions:
poetry
: 2.1.1
Python 3.13.2
pytest 8.2.0
sortedcontainers 2.4.0 (from poetry run pip list
)
In my current codebase I have recently had extremely slow start-up times with pytest.
Just running this command, for instance:
$ time poetry run pytest --version
pytest 8.2.0
real 0m32.409s
...
This looks somewhat familiar to #9941, in that it seems to get stuck around this line when running with PYTEST_DEBUG=1
:
...
early skip of rewriting module: sortedcontainers.sorteddict [assertion] # gets stuck here, next line doesn't print for ages
early skip of rewriting module: MY_DIR.MY_DMODULE [assertion] # this comes after, not sure if it's my code that's the culprit
Any idea why this should be so slow? The actual collection and running of tests is perfectly fine from what I can tell.