From 8dcb28d1d6e0d762aed721e8a3135fa98bf0c338 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Mar 2023 23:03:35 +0100 Subject: [PATCH] Proper coverage of block_range in try star node --- tests/test_group_exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_group_exceptions.py b/tests/test_group_exceptions.py index be630c4594..d3a577b658 100644 --- a/tests/test_group_exceptions.py +++ b/tests/test_group_exceptions.py @@ -61,6 +61,17 @@ def test_star_exceptions() -> None: ) assert isinstance(node, TryStar) assert isinstance(node.body[0], Raise) + assert node.block_range(1) == (1, 11) + assert node.block_range(2) == (2, 2) + assert node.block_range(3) == (3, 3) + assert node.block_range(4) == (4, 4) + assert node.block_range(5) == (5, 5) + assert node.block_range(6) == (6, 6) + assert node.block_range(7) == (7, 7) + assert node.block_range(8) == (8, 8) + assert node.block_range(9) == (9, 9) + assert node.block_range(10) == (10, 10) + assert node.block_range(11) == (11, 11) assert node.handlers handler = node.handlers[0] assert isinstance(handler, ExceptHandler)