diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2019-05-19 11:14:12 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-05-19 11:14:12 +0200 |
commit | c58dfdd557530f396f213eb5777df7a3c61dd08a (patch) | |
tree | 9f295e6d0537d42c0f855e96d03f82c81d7d1c23 | |
parent | b488ce54e30762d81c9a7eb5c43ed904ee91cf2c (diff) | |
download | pylint-git-c58dfdd557530f396f213eb5777df7a3c61dd08a.tar.gz |
Add test to demonstrate that a recursion error does not happen. Close #2906
-rw-r--r-- | pylint/test/functional/recursion_error_2906.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pylint/test/functional/recursion_error_2906.py b/pylint/test/functional/recursion_error_2906.py new file mode 100644 index 000000000..062109672 --- /dev/null +++ b/pylint/test/functional/recursion_error_2906.py @@ -0,0 +1,14 @@ +"""Recursion error for https://github.com/PyCQA/pylint/issues/2906""" +# pylint: disable=blacklisted-name,global-statement,invalid-name,missing-docstring +lst = [] + + +def foo(): + lst.append(0) + + +def bar(): + global lst + + length = len(lst) + lst += [length] |