Skip to content

Commit

Permalink
Test that something like with (a): pass doesn't get autodetected as 3.9+
Browse files Browse the repository at this point in the history
  • Loading branch information
yilei committed Jan 11, 2023
1 parent b1ca322 commit a81d7b4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/data/preview_context_managers/auto_detect/features_3_8.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# This file doesn't used any Python 3.9+ only grammars.
# This file doesn't use any Python 3.9+ only grammars.


# Make sure parens around a single context manager don't get autodetected as
# Python 3.9+.
with (a):
pass


with \
Expand All @@ -11,7 +17,13 @@


# output
# This file doesn't used any Python 3.9+ only grammars.
# This file doesn't use any Python 3.9+ only grammars.


# Make sure parens around a single context manager don't get autodetected as
# Python 3.9+.
with a:
pass


with make_context_manager1() as cm1, make_context_manager2() as cm2, make_context_manager3() as cm3, make_context_manager4() as cm4:
Expand Down

0 comments on commit a81d7b4

Please sign in to comment.