Skip to content

Commit 0ff2cb5

Browse files
Pierre-SassoulasDanielNoord
authored andcommitted
Add a regression tests for issue #2567
1 parent 361a1f7 commit 0ff2cb5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""
2+
Regression test for `no-member`.
3+
See: https://github.com/PyCQA/pylint/issues/2567
4+
"""
5+
6+
# pylint: disable=missing-docstring,too-few-public-methods
7+
8+
import contextlib
9+
10+
11+
@contextlib.contextmanager
12+
def context_manager():
13+
try:
14+
yield
15+
finally:
16+
pass
17+
18+
19+
cm = context_manager()
20+
cm.__enter__()
21+
cm.__exit__(None, None, None)
22+
23+
24+
@contextlib.contextmanager
25+
def other_context_manager():
26+
try:
27+
yield
28+
finally:
29+
pass
30+
31+
32+
with other_context_manager(): # notice the function call
33+
pass

0 commit comments

Comments
 (0)