Skip to content

Commit

Permalink
[pylint-dev#4692] Add a regression test for inference crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Jul 21, 2021
1 parent a2c166c commit f039df2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -21,6 +21,11 @@ Release date: TBA

Closes #4732

* Fix a crash when a AttributeInferenceError was not handled properly when
failing to infer the real name of an import in astroid.

Closes #4692


What's New in Pylint 2.9.4?
===========================
Expand Down
7 changes: 7 additions & 0 deletions tests/functional/i/inference_crash_4692.py
@@ -0,0 +1,7 @@
"""Regression test for https://github.com/PyCQA/pylint/issues/4692."""

import click # [import-error]


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

0 comments on commit f039df2

Please sign in to comment.