-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gracefully handle empty failure tags
This commit fixes #137. Some JUnit generators emit an empty failure tag, with only a message property set. In those cases, the parser crashes when trying to match the failure with a source file. Since this feature is optional, the simplest fix is to skip the processing when the failure tag is empty. Also added a test, and the corresponding input file is generated from a reporter within our codebase.
- Loading branch information
Hervé Audren
committed
Nov 28, 2022
1 parent
074fe2c
commit a910866
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<testsuites name="my_package.test_foo" tests="3" failures="1" errors="0" time="6.79"><testsuite name="my_package.test_foo.launch_tests" tests="3" failures="1" errors="0" skipped="0" time="6.79"><testcase classname="my_package.TestFoo" name="test_normal_case" time="2.172" /><testcase classname="my_package.TestFoo" name="test_other_case" time="4.558"><failure message="Traceback (most recent call last): File "/home/redacted/test_foo.py", line 183, in test_other_case self.assertFalse(True) AssertionError: True is not false " /></testcase><testcase classname="my_package.TestFoo" name="test_yet_another_case" time="0.06" /></testsuite></testsuites> |
This file contains 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
This file contains 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