INNER CODE UNIT · Python
TestMain
apache/ozone · dev-support/ci/test_junit_summary.py:161
class TestMain(unittest.TestCase):
write_report = TestParseReport.write_report
def run_main(self, argv):
out = io.StringIO()
with contextlib.redirect_stdout(out):
code = junit_summary.main(argv)
return code, out.getvalue()
def test_find_reports_dedupes_both_trees(self):
with tempfile.TemporaryDirectory() as tmp:
self.write_report(tmp, "hadoop-hdds/common/target/surefire-reports/TEST-a.xml")
self.write_report(tmp, "target/unit/surefire-reports/TEST-b.xml")
reports = junit_summary.find_reports(tmp)
self.assertEqual(len(reports), 2)
def test_find_reports_skips_iteration_dirs(self):