INNER CODE UNIT · Python

run_main

apache/ozone · dev-support/ci/test_junit_summary.py:165

  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):
    with tempfile.TemporaryDirectory() as tmp:
      self.write_report(tmp, "target/unit/TEST-a.xml")
      self.write_report(tmp, "target/unit/iteration2/TEST-a.xml")
      reports = junit_summary.find_reports(tmp)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…