INNER CODE UNIT · Python

cell

apache/ozone · dev-support/ci/junit_summary.py:106

def cell(text):
  return html.escape(" ".join(str(text).split())).replace("|", "\\|")


def render_table(title, header, rows):
  lines = ["<details><summary><b>%s (%d)</b></summary>" % (title, len(rows)), ""]
  lines.append("|" + "|".join(header) + "|")
  lines.append("|" + "|".join("---" for _ in header) + "|")
  lines.extend("|" + "|".join(cell(value) for value in row) + "|" for row in rows)
  lines.extend(["", "</details>", ""])
  return lines


def render_summary(cases):
  def select(status):
    return [c for c in cases if c.status == status]

  def full_name(case):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…