black/tests/data/cases/preview_context_managers_autodetect_310.py
Jelle Zijlstra a69bda3b9b
Use inline flags for test cases (#3931)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-10-09 18:43:47 -07:00

37 lines
637 B
Python

# flags: --preview --minimum-version=3.10
# This file uses pattern matching introduced in Python 3.10.
match http_code:
case 404:
print("Not found")
with \
make_context_manager1() as cm1, \
make_context_manager2() as cm2, \
make_context_manager3() as cm3, \
make_context_manager4() as cm4 \
:
pass
# output
# This file uses pattern matching introduced in Python 3.10.
match http_code:
case 404:
print("Not found")
with (
make_context_manager1() as cm1,
make_context_manager2() as cm2,
make_context_manager3() as cm3,
make_context_manager4() as cm4,
):
pass