Skip to content

Commit

Permalink
add tests about parenthesized context managers
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed Nov 13, 2021
1 parent 126a522 commit d16f6c7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions tests/data/parenthesized_context_managers.py
@@ -0,0 +1,21 @@
with (CtxManager() as example):
...

with (CtxManager1(), CtxManager2()):
...

with (CtxManager1() as example, CtxManager2()):
...

with (CtxManager1(), CtxManager2() as example):
...

with (CtxManager1() as example1, CtxManager2() as example2):
...

with (
CtxManager1() as example1,
CtxManager2() as example2,
CtxManager3() as example3,
):
...
6 changes: 5 additions & 1 deletion tests/test_format.py
Expand Up @@ -70,7 +70,11 @@
"percent_precedence",
]

PY310_CASES = ["pattern_matching_simple", "pattern_matching_complex"]
PY310_CASES = [
"pattern_matching_simple",
"pattern_matching_complex",
"parenthesized_context_managers",
]

SOURCES = [
"src/black/__init__.py",
Expand Down

0 comments on commit d16f6c7

Please sign in to comment.