From dbb03ee4c8736dec9d17896d0e40aae300d6bf0e Mon Sep 17 00:00:00 2001 From: ptmcg Date: Fri, 11 Nov 2022 02:38:35 -0600 Subject: Debugging railroad diagram tests --- tests/test_diagram.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_diagram.py b/tests/test_diagram.py index 52bb0c7..f81dcbc 100644 --- a/tests/test_diagram.py +++ b/tests/test_diagram.py @@ -65,7 +65,10 @@ class TestRailroadDiagrams(unittest.TestCase): with self.subTest(f"{label}: test rr diag without results names"): railroad = self.generate_railroad(example_expr, example_expr) if len(railroad) != expected_rr_len: - print(railroad_to_html(railroad)) + diag_html = railroad_to_html(railroad) + for line in diag_html.splitlines(): + if 'h1 class="railroad-heading"' in line: + print(line) assert len(railroad) == expected_rr_len, f"expected {expected_rr_len}, got {len(railroad)}" with self.subTest(f"{label}: test rr diag with results names"): -- cgit v1.2.1