summaryrefslogtreecommitdiff
path: root/tests/functional/r/regression_02/regression_2567.py
blob: 7de293bfb7f99c66d0f2168c6055d989c4f2584d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
Regression test for `no-member`.
See: https://github.com/pylint-dev/pylint/issues/2567
"""

# pylint: disable=missing-docstring,too-few-public-methods

import contextlib


@contextlib.contextmanager
def context_manager():
    try:
        yield
    finally:
        pass


cm = context_manager()
cm.__enter__()
cm.__exit__(None, None, None)


@contextlib.contextmanager
def other_context_manager():
    try:
        yield
    finally:
        pass


with other_context_manager():  # notice the function call
    pass