-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When running many repeatitions of a test with --count, .pytest_cache/v/cache/nodeids may get up to millions of entries. Eg:
"test/utils/test_types.py::test_if_none[1-100]",
"test/utils/test_types.py::test_if_none[10-100]",
"test/utils/test_types.py::test_if_none[100-100]",
"test/utils/test_types.py::test_if_none[11-100]",
"test/utils/test_types.py::test_if_none[12-100]",
...
This may cause a lag of several seconds even after executing a single method with -k specifying a single test file.
The culprit is pytest_sessionfinish in cacheprovider.py, when calling config.cache.set("cache/nodeids", sorted(self.cached_nodeids)). When cached_nodeids contains milions of entries, this function always generates a json with the whole contents of .pytest_cache/v/cache/nodeids.
Metadata
Metadata
Assignees
Labels
No labels