| 1 |
# This file doesn't use any Python 3.9+ only grammars. |
| 2 |
|
| 3 |
|
| 4 |
# Make sure parens around a single context manager don't get autodetected as |
| 5 |
# Python 3.9+. |
| 6 |
with (a): |
| 7 |
pass |
| 8 |
|
| 9 |
|
| 10 |
with \ |
| 11 |
make_context_manager1() as cm1, \ |
| 12 |
make_context_manager2() as cm2, \ |
| 13 |
make_context_manager3() as cm3, \ |
| 14 |
make_context_manager4() as cm4 \ |
| 15 |
: |
| 16 |
pass |
| 17 |
|
| 18 |
|
| 19 |
with mock.patch.object( |
| 20 |
self.my_runner, "first_method", autospec=True |
| 21 |
) as mock_run_adb, mock.patch.object( |
| 22 |
self.my_runner, "second_method", autospec=True, return_value="foo" |
| 23 |
): |
| 24 |
pass |
| 25 |
|
| 26 |
|
| 27 |
# output |
| 28 |
# This file doesn't use any Python 3.9+ only grammars. |
| 29 |
|
| 30 |
|
| 31 |
# Make sure parens around a single context manager don't get autodetected as |
| 32 |
# Python 3.9+. |
| 33 |
with a: |
| 34 |
pass |
| 35 |
|
| 36 |
|
| 37 |
with make_context_manager1() as cm1, make_context_manager2() as cm2, make_context_manager3() as cm3, make_context_manager4() as cm4: |
| 38 |
pass |
| 39 |
|
| 40 |
|
| 41 |
with mock.patch.object( |
| 42 |
self.my_runner, "first_method", autospec=True |
| 43 |
) as mock_run_adb, mock.patch.object( |
| 44 |
self.my_runner, "second_method", autospec=True, return_value="foo" |
| 45 |
): |
| 46 |
pass |