Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for crash on Compare node inference #5057

Merged
merged 5 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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