Skip to content

Commit

Permalink
Limit try-except-star to Python 3.11 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Oct 2, 2023
1 parent 00ff3c3 commit ee4de09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ropetest/refactor/extracttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,7 @@ def g():
""")
self.assertEqual(expected, refactored)

@testutils.only_for_versions_higher("3.11")
def test_extract_method_and_try_except_star_block_1(self):
code = dedent("""\
def f():
Expand Down
1 change: 1 addition & 0 deletions ropetest/refactor/patchedasttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,7 @@ def test_try_except_and_finally_node(self):
expected_children = ["try", "", ":", "\n ", "Pass", "\n", "ExceptHandler", "\n", "finally", "", ":", "\n ", "Pass"]
checker.check_children(node_to_test, expected_children)

@testutils.only_for_versions_higher("3.11")
def test_try_except_group_node(self):
source = dedent("""\
try:
Expand Down

0 comments on commit ee4de09

Please sign in to comment.