Skip to content

Commit

Permalink
[4692 regression] Test won't fail if the real click is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Jul 21, 2021
1 parent 2e3778e commit dbfde30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tests/functional/i/inference_crash_4692.py
@@ -1,7 +1,9 @@
"""Regression test for https://github.com/PyCQA/pylint/issues/4692."""

import click # [import-error]
# We can't use click like in the issue because the crash
# does not appear if click is installed (astroid can analyse it)
import notclick # [import-error]


for name, item in click.__dict__.items():
_ = isinstance(item, click.Command) and item != 'foo'
for name, item in notclick.__dict__.items():
_ = isinstance(item, notclick.Command) and item != 'foo'
2 changes: 1 addition & 1 deletion tests/functional/i/inference_crash_4692.txt
@@ -1 +1 @@
import-error:3:0::Unable to import 'click':HIGH
import-error:5:0::Unable to import 'notclick':HIGH

0 comments on commit dbfde30

Please sign in to comment.