Skip to content

Commit

Permalink
Add a regression tests for issue pylint-dev#2567
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Jan 13, 2023
1 parent 361a1f7 commit e0a4a6e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/functional/r/regression_02/regression_2567.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""
Regression test for `no-member`.
See: https://github.com/PyCQA/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

0 comments on commit e0a4a6e

Please sign in to comment.