Repository navigation
[JUnit] Fix Windows drive paths - #860
Merged
mvandervoord merged 1 commit intoOct 29, 2026
Merged
mvandervoord merged 1 commit into
mvandervoord merged 1 commit into
Conversation
Drive-letter paths were split at the colon, which could turn failing tests into successful JUnit cases. Recognize Windows paths before parsing the result fields. Fixes ThrowTheSwitch#628 Signed-off-by: zhouzhuohua <zhouzhuohua27@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🍍
Fixes #628.
The Python JUnit converter treated the colon in a Windows drive letter as a field separator. With a path such as
C:\Path\test_example.c:24:test_example:FAIL:message, this produced a testcase named24with no failure. The existing forward-slash parser also truncated paths containing spaces.The issue discussion by @lukzeg identified the backslash path case.
Testing:
PYTHONPATH=/tmp/unity-junit-xml python3 -m unittest discover -s test -p test_stylize_as_junit.py -v(2 tests passed; Python 3.12 and pyparsing 3.1.1). Thejunit-xmllibrary was obtained from its upstream repository for local testing because the local package proxy was unavailable.git diff --checkpassed. Existing resource and deprecation warnings were observed.This contribution was developed with AI assistance and reviewed by the contributor.