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
Pytest is wonderful but it can be slow at times. Is it on Astral's roadmap to improve the experience around testing in Python?
That's probably a big project, but I wonder if there is some low-ish hanging fruit around just the collection phase?
Certainly just identifying the functions to be tested would be faster leveraging what Ruff already has available after scanning the package - maybe that alone would give a little boost.
A bigger boost could be obtained if there was a smarter way to deal with module imports - those, I believe, are the next big culprit for time spent in the collection phase.
Finally, as long as one is still tied to pytest for post-collection, there is the overhead of packaging up what you've collected into an object suitable for pytest's consumption, which hopefully doesn't cancel out the above two performance gains.
Anyway- have folks thought about this?
Apologies if this is not the appropriate place for this discussion.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Pytest is wonderful but it can be slow at times. Is it on Astral's roadmap to improve the experience around testing in Python?
That's probably a big project, but I wonder if there is some low-ish hanging fruit around just the collection phase?
Certainly just identifying the functions to be tested would be faster leveraging what Ruff already has available after scanning the package - maybe that alone would give a little boost.
A bigger boost could be obtained if there was a smarter way to deal with module imports - those, I believe, are the next big culprit for time spent in the collection phase.
Finally, as long as one is still tied to pytest for post-collection, there is the overhead of packaging up what you've collected into an object suitable for pytest's consumption, which hopefully doesn't cancel out the above two performance gains.
Anyway- have folks thought about this?
Apologies if this is not the appropriate place for this discussion.
Beta Was this translation helpful? Give feedback.
All reactions