Ask HN: What are some modern testing tools for Python?

1 points by barefeg ↗ HN
I would love to have something like Jest for python. For example only running the tests that were affected by the previous code changes

3 comments

[ 0.23 ms ] story [ 22.3 ms ] thread
I don't know about Jest. Searching for "python test only code changes" online, got me this SO [0] Q&A, and one of the comments mentioned this plugin for pytest [1]. There were other SO results too.

[0] https://stackoverflow.com/questions/13447627/testing-only-af...

[1] https://github.com/tarpas/pytest-testmon

I have tried testmon before, but it didn’t really work that great. What tools do you use for this type of problem? And if not how do you overcome it? Splitting the code base, making sure tests run very fast?
My Python use is limited to small scripts, for which assert is enough for testing. Don't have much experience with pytest. The topic was interesting, so I tried to search for solutions.

I do remember a related blog, which won't directly help you, but might be interesting to read: https://hacks.mozilla.org/2020/07/testing-firefox-more-effic...