diff options
author | ptmcg <ptmcg@austin.rr.com> | 2022-11-11 02:38:35 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2022-11-11 02:38:35 -0600 |
commit | dbb03ee4c8736dec9d17896d0e40aae300d6bf0e (patch) | |
tree | bfd744ee8927eda26d92aba0b3919a988b865bfc /tests | |
parent | 116dc35fe50be5dd5419db23f057daf8f08b405a (diff) | |
download | pyparsing-git-dbb03ee4c8736dec9d17896d0e40aae300d6bf0e.tar.gz |
Debugging railroad diagram tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_diagram.py | 5 |
1 files changed, 4 insertions, 1 deletions
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"): |