Skip to content

Commit

Permalink
Add test for crash on Compare node inference (#5057)
Browse files Browse the repository at this point in the history
Closes #5048

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
  • Loading branch information
DanielNoord and cdce8p authored Oct 7, 2021
1 parent 5143e3a commit 066a184
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Release date: TBA
Closes #5030
Closes #5036

* Fix regression on Compare node inference

Closes #5048


What's New in Pylint 2.11.1?
============================
Expand Down
9 changes: 9 additions & 0 deletions tests/functional/r/regression/regression_5048.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Crash regression in astroid on Compare node inference
Fixed in https://github.com/PyCQA/astroid/pull/1185"""
# pylint: disable=missing-docstring


# Reported at https://github.com/PyCQA/pylint/issues/5048
def func(parameter):
if tuple() + (parameter[1],) in set():
raise Exception()
3 changes: 2 additions & 1 deletion tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@

# 'Wet finger' number of files that are reasonable to display by an IDE
# 'Wet finger' as in 'in my settings there are precisely this many'.
REASONABLY_DISPLAYABLE_VERTICALLY = 48
# TODO revert back to 48 after reorganizing r/regression # pylint: disable=fixme
REASONABLY_DISPLAYABLE_VERTICALLY = 60


class LintModuleOutputUpdate(testutils.LintModuleTest):
Expand Down

0 comments on commit 066a184

Please sign in to comment.