Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def process_xml(self, path: Path) -> None:
if not path.exists():
return
print(f"Processing {path}")
suites = JUnitXml.fromfile(path)
if isinstance(suites, TestSuite):
suites = [suites]
for suite in suites:
self.add_tests(suite)