-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4692 regression] Test won't fail if the real click is installed
- Loading branch information
1 parent
2e3778e
commit dbfde30
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import-error:3:0::Unable to import 'click':HIGH | ||
import-error:5:0::Unable to import 'notclick':HIGH |