diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2019-01-20 18:27:53 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-01-20 18:28:27 +0100 |
commit | bc4b56ee862ff8e8784d5fe65bc4fc1ed0271f3d (patch) | |
tree | af949af7f95c02ecccf8728da24b9b1fdc10c7b2 | |
parent | 6b85128e7b817dab3e48a9a1d7665a280b2989f0 (diff) | |
download | pylint-git-bc4b56ee862ff8e8784d5fe65bc4fc1ed0271f3d.tar.gz |
Add test that a recursion error does not happen any longer. Close #2683
-rw-r--r-- | pylint/test/functional/recursion_error_crash_2683.py | 13 | ||||
-rw-r--r-- | pylint/test/functional/recursion_error_crash_2683.txt | 0 |
2 files changed, 13 insertions, 0 deletions
diff --git a/pylint/test/functional/recursion_error_crash_2683.py b/pylint/test/functional/recursion_error_crash_2683.py new file mode 100644 index 000000000..05978a355 --- /dev/null +++ b/pylint/test/functional/recursion_error_crash_2683.py @@ -0,0 +1,13 @@ +"""Test for https://github.com/PyCQA/pylint/issues/2683""" +# pylint: disable=missing-docstring,too-few-public-methods + +class Cls: + def __init__(self): + self.count = 5 + + def method(self): + records = [] + for _ in []: + records += [] + records = records[:self.count] + records.sort() diff --git a/pylint/test/functional/recursion_error_crash_2683.txt b/pylint/test/functional/recursion_error_crash_2683.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pylint/test/functional/recursion_error_crash_2683.txt |