https://pantsbuild.org/ logo
#general
Title
# general
b

brief-ambulance-96324

12/09/2022, 12:21 AM
I have a python project that contains many small test files containing small tests, each of which only takes a few seconds to run. I was previously caching these tests using testmon (https://github.com/tarpas/pytest-testmon), which determines fine-grained dependencies using coverage.py. Since my unit tests do not have non-python dependencies, this works well. I am trying pants, and have noticed some significant slowdown in the speed of my test suite. One possible cause may be pants's approach of calling pytest seperately for each test file, meaning that the overhead of starting pytest must be paid for every small test file. I am pleased to see the recent PR: https://github.com/pantsbuild/pants/pull/17385, which allows pants to run multiple test files with a single call to pytest. However, my understanding is that enabling this feature will also make the pants cache less fine-grained and so less useful. Is this correct? If so, are there any plans for adding the ability to retain fine-grained test caching while also making a single call to pytest? Thanks!