]> git.madduck.net Git - etc/vim.git/blob - tests/data/preview_context_managers/auto_detect/features_3_8.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Bump peter-evans/create-or-update-comment from 2.1.0 to 2.1.1 (#3548)
[etc/vim.git] / tests / data / preview_context_managers / auto_detect / features_3_8.py
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