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

happy-computer-80795

05/11/2023, 7:10 PM
What's the best way to use pants w/ pytest-csv? I want to create a csv file of all test results, but it appears that executing under pants the parallelism by file results in only the last completed test having results (instead of appending). Alternative tools or methods welcome.
I suspect the answer is; fix pytest-csv so it can optionally append
e

enough-analyst-54434

05/11/2023, 7:33 PM
Or whip out your old XML skills:
Copy code
jsirois@Gill-Windows:~/dev/pantsbuild/jsirois-scie-pants (CI/fix-lints-to-fail) $ pants test --report ::
12:33:26.30 [INFO] Completed: Run Pytest - tools/tests/test_pants_bootstrap.py - succeeded.
12:33:26.87 [INFO] Completed: Run Pytest - tools/tests/test_bootstrap_tools.py - succeeded.

āœ“ tools/tests/test_bootstrap_tools.py succeeded in 0.76s.
āœ“ tools/tests/test_pants_bootstrap.py succeeded in 0.20s.

Wrote test reports to dist/test/reports
jsirois@Gill-Windows:~/dev/pantsbuild/jsirois-scie-pants (CI/fix-lints-to-fail) $ ls -l dist/test/reports/
total 8
-rw-r--r-- 1 jsirois jsirois 869 May 11 12:33 tools.tests.test_bootstrap_tools.py.xml
-rw-r--r-- 1 jsirois jsirois 497 May 11 12:33 tools.tests.test_pants_bootstrap.py.xml
h

happy-computer-80795

05/11/2023, 7:36 PM
Yeah, I can do that.
2 Views