quaint-telephone-89068
10/28/2022, 9:19 PMpants test
triggers pytest on a per-file basis. This has different behavior compared to running pytest <foldername>
because each pytest session only knows the single test file. This results in:
• the pytest report summary on terminal is created per test file, and the only really useful test summary is the one provided by pants which provides less information compared to the pytest summary.
• pytest plugins that create summary reports (such as pytest-html, pytest-json) create a single report per file (compared to a single report for all executed tests)
• pytest session scope fixtures are initialized repeatedly because for each test file a new pytest session is started.
I'm just speaking for myself, but I got so used to these points just working when using pytest that running python tests in pants as it is now feels like a downgrade to me. It would be great if there was a way to have the "vanilla" pytest experience also when using pants.
pantsbuild/pantsuser
10/28/2022, 9:19 PM