summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-10-07 15:05:45 +0200
committerGitHub <noreply@github.com>2021-10-07 15:05:45 +0200
commit066a1846634a3693abb41ce96da4dcdceef47ac0 (patch)
tree3b7019971b340acd8c55d3b359157c7abd0f4bd2
parent5143e3a28b59fcf42addaabb0c93d55f911c890a (diff)
downloadpylint-git-066a1846634a3693abb41ce96da4dcdceef47ac0.tar.gz
Add test for crash on Compare node inference (#5057)
Closes #5048 Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
-rw-r--r--ChangeLog4
-rw-r--r--tests/functional/r/regression/regression_5048.py9
-rw-r--r--tests/test_functional.py3
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 00eb650ec..c63a18a84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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?
============================
diff --git a/tests/functional/r/regression/regression_5048.py b/tests/functional/r/regression/regression_5048.py
new file mode 100644
index 000000000..5656759af
--- /dev/null
+++ b/tests/functional/r/regression/regression_5048.py
@@ -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()
diff --git a/tests/test_functional.py b/tests/test_functional.py
index 513823a05..9b1f8ea7a 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -45,7 +45,8 @@ from pylint.utils import HAS_ISORT_5
# '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):