Skip to content

Commit

Permalink
Support large CDATA in JUnit XML files with ignore_runs
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Jul 5, 2022
1 parent 7a453e7 commit 9dc979d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/publish/junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from publish.unittestresults import ParsedUnitTestResults, UnitTestCase, ParseError

try:
import lxml
import lxml.etree
lxml_available = True
except ImportError:
lxml_available = False
Expand Down Expand Up @@ -138,7 +138,8 @@ def parse(path: str) -> JUnitTreeOrException:
try:
if drop_testcases:
builder = DropTestCaseBuilder()
return etree.parse(path, parser=etree.XMLParser(target=builder, encoding='utf-8'))
parser = etree.XMLParser(target=builder, encoding='utf-8', huge_tree=True)
return etree.parse(path, parser=parser)
return etree.parse(path)
except BaseException as e:
return e
Expand Down

0 comments on commit 9dc979d

Please sign in to comment.