]> git.madduck.net Git - etc/vim.git/blob - tests/data/cases/preview_context_managers_autodetect_38.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:

Fix parser bug where "type" was misinterpreted as a keyword inside a match (#3950)
[etc/vim.git] / tests / data / cases / preview_context_managers_autodetect_38.py
1 # flags: --preview
2 # This file doesn't use any Python 3.9+ only grammars.
3
4
5 # Make sure parens around a single context manager don't get autodetected as
6 # Python 3.9+.
7 with (a):
8     pass
9
10
11 with \
12      make_context_manager1() as cm1, \
13      make_context_manager2() as cm2, \
14      make_context_manager3() as cm3, \
15      make_context_manager4() as cm4 \
16 :
17     pass
18
19
20 with mock.patch.object(
21     self.my_runner, "first_method", autospec=True
22 ) as mock_run_adb, mock.patch.object(
23     self.my_runner, "second_method", autospec=True, return_value="foo"
24 ):
25     pass
26
27
28 # output
29 # This file doesn't use any Python 3.9+ only grammars.
30
31
32 # Make sure parens around a single context manager don't get autodetected as
33 # Python 3.9+.
34 with a:
35     pass
36
37
38 with make_context_manager1() as cm1, make_context_manager2() as cm2, make_context_manager3() as cm3, make_context_manager4() as cm4:
39     pass
40
41
42 with mock.patch.object(
43     self.my_runner, "first_method", autospec=True
44 ) as mock_run_adb, mock.patch.object(
45     self.my_runner, "second_method", autospec=True, return_value="foo"
46 ):
47     pass