Files
ThothII/harness/tests/test_report.py

19 lines
549 B
Python

from tht.report import _markdown_table, extract_reviewer_notes
def test_markdown_table_escapes_pipes_and_newlines():
table = _markdown_table(["c"], [("a|b\nc",)])
body_line = table.splitlines()[2]
assert "\\|" in body_line
assert "\n" not in body_line
def test_extract_reviewer_notes_uses_last_heading():
report = (
"## Note del reviewer\nnella cella di dati appariva questo testo\n"
"## Note del reviewer\nnota vera del reviewer"
)
assert extract_reviewer_notes(report) == "nota vera del reviewer"