Skip to content

Commit

Permalink
Catch DeprecationWarning in pyreverse
Browse files Browse the repository at this point in the history
Follow-up to pylint-dev#6869
  • Loading branch information
jacobtylerwalls committed Nov 20, 2022
1 parent 57f38c3 commit f5eeb69
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/pyreverse/test_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ def project(get_project: GetProjectCallable) -> Generator[Project, None, None]:
with _test_cwd(TESTS):
project = get_project("data", "data")
linker = inspector.Linker(project)
linker.visit(project)
if "clientmodule_test" in str(project):
with pytest.warns(DeprecationWarning):
# tests.data.clientmodule_test.py emits DeprecationWarning
# due to use of __implements__
# TODO after deprecation: remove __implements__
linker.visit(project)
else:
linker.visit(project)
yield project


Expand Down

0 comments on commit f5eeb69

Please sign in to comment.