INNER CODE UNIT · Python

test_render_escapes_every_cell

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

  def test_render_escapes_every_cell(self):
    # parameterized test names can contain pipes and HTML-significant chars
    cases = [junit_summary.TestCase("common", "org.X", "test[a|b]<c>", 1.0, "failed", "got |x| <y>")]
    md = junit_summary.render_summary(cases)
    self.assertIn("|common|org.X.test[a\\|b]&lt;c&gt;|got \\|x\\| &lt;y&gt;|1s|", md)

  def test_render_report_url(self):
    os.environ["JUNIT_REPORT_URL"] = "https://example.com/artifact"
    try:
      md = junit_summary.render_summary(self.make_cases())
    finally:
      del os.environ["JUNIT_REPORT_URL"]
    self.assertIn("[Download test artifacts](https://example.com/artifact)", md)


class TestMain(unittest.TestCase):

  write_report = TestParseReport.write_report

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…