diff options
-rw-r--r-- | tests/test_diagram.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_diagram.py b/tests/test_diagram.py index 77672b3..52bb0c7 100644 --- a/tests/test_diagram.py +++ b/tests/test_diagram.py @@ -49,25 +49,29 @@ class TestRailroadDiagrams(unittest.TestCase): railroad = to_railroad(expr, show_results_names=show_results_names) # temp.write(railroad_to_html(railroad)) - if self.railroad_debug(): + if self.railroad_debug() or True: print(f"{label}: {temp.name}") return railroad def test_example_rr_diags(self): subtests = [ - (boolExpr, "boolExpr", 5), (jsonObject, "jsonObject", 8), + (boolExpr, "boolExpr", 5), (simpleSQL, "simpleSQL", 20), (calendars, "calendars", 13), ] for example_expr, label, expected_rr_len in subtests: 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)) 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"): railroad = self.generate_railroad(example_expr, example_expr, show_results_names=True) + if len(railroad) != expected_rr_len: + print(railroad_to_html(railroad)) assert len(railroad) == expected_rr_len, f"expected {expected_rr_len}, got {len(railroad)}" def test_nested_forward_with_inner_and_outer_names(self): |