Skip to content

Commit dbfde30

Browse files
[4692 regression] Test won't fail if the real click is installed
1 parent 2e3778e commit dbfde30

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""Regression test for https://github.com/PyCQA/pylint/issues/4692."""
22

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

57

6-
for name, item in click.__dict__.items():
7-
_ = isinstance(item, click.Command) and item != 'foo'
8+
for name, item in notclick.__dict__.items():
9+
_ = isinstance(item, notclick.Command) and item != 'foo'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import-error:3:0::Unable to import 'click':HIGH
1+
import-error:5:0::Unable to import 'notclick':HIGH

0 commit comments

Comments
 (0)