Skip to content

Commit a8b1c82

Browse files
committed
Add a failing test
1 parent c40b5b9 commit a8b1c82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_ast.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,10 @@ def test_assignment_expression_feature_version(self):
10581058
with self.assertRaises(SyntaxError):
10591059
ast.parse('(x := 0)', feature_version=(3, 7))
10601060

1061+
def test_conditional_context_managers_parse_with_low_feature_version(self):
1062+
# regression test for gh-115881
1063+
ast.parse('with (x() if y else z()): ...', feature_version=(3, 8))
1064+
10611065
def test_exception_groups_feature_version(self):
10621066
code = dedent('''
10631067
try: ...

0 commit comments

Comments
 (0)