Python support

Add python-xunit-parser.ts with associated case statement
Add python-xunit to reporter docs in action.yml
Add tests
Update README

Resolves #244
Resolves #633
This commit is contained in:
Michael Marcus 2025-07-25 15:06:22 -04:00
parent e2f0ff6339
commit 9b8d3b002e
9 changed files with 213 additions and 1 deletions

View file

@ -19,6 +19,7 @@ This [Github Action](https://github.com/features/actions) displays test results
- Go / [go test](https://pkg.go.dev/testing)
- Java / [JUnit](https://junit.org/)
- JavaScript / [JEST](https://jestjs.io/) / [Mocha](https://mochajs.org/)
- Python / [pytest](https://docs.pytest.org/en/stable/) / [unittest](https://docs.python.org/3/library/unittest.html)
- Swift / xUnit
For more information see [Supported formats](#supported-formats) section.
@ -145,7 +146,9 @@ jobs:
# java-junit
# jest-junit
# mocha-json
# python-xunit
# rspec-json
# swift-xunit
reporter: ''
# Allows you to generate only the summary.
@ -349,6 +352,16 @@ Before version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0), M
Please update Mocha to version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0) or above if you encounter this issue.
</details>
<details>
<summary>python-xunit (Experimental)</summary>
Support for Python test results in xUnit format is experimental - should work but it was not extensively tested.
For pytest support, configure [JUnit XML output](https://docs.pytest.org/en/stable/how-to/output.html#creating-junitxml-format-files) and run with the `--junit-xml` option, which also lets you specify the output path for test results.
For unittest support, use a test runner that outputs the JUnit report format, such as [unittest-xml-reporting](https://pypi.org/project/unittest-xml-reporting/).
</details>
<details>
<summary>swift-xunit (Experimental)</summary>