diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-09 20:30:12 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-14 19:48:30 +0100 |
commit | 55a1991d8a694bd70e38bd49bc8d69075660ee64 (patch) | |
tree | 27aea2addecfe79ce5f1afe8f43d5d5921012c61 /tests/functional/n | |
parent | 3c80899ed4991831876715f58344191b1c339e33 (diff) | |
download | pylint-git-55a1991d8a694bd70e38bd49bc8d69075660ee64.tar.gz |
Migrate func_no_dummy_redefined.py to new functional tests
Diffstat (limited to 'tests/functional/n')
-rw-r--r-- | tests/functional/n/no/no_dummy_redefined.py | 14 | ||||
-rw-r--r-- | tests/functional/n/no/no_dummy_redefined.txt | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/functional/n/no/no_dummy_redefined.py b/tests/functional/n/no/no_dummy_redefined.py new file mode 100644 index 000000000..c6b093dad --- /dev/null +++ b/tests/functional/n/no/no_dummy_redefined.py @@ -0,0 +1,14 @@ +"""Make sure warnings about redefinitions do not trigger for dummy variables.""" +from __future__ import print_function + + +_, INTERESTING = 'a=b'.split('=') + +value = 10 # [invalid-name] + + +def clobbering(): + """Clobbers a dummy name from the outer scope.""" + value = 9 # [redefined-outer-name] + for _ in range(7): + print(value) diff --git a/tests/functional/n/no/no_dummy_redefined.txt b/tests/functional/n/no/no_dummy_redefined.txt new file mode 100644 index 000000000..3e6854be5 --- /dev/null +++ b/tests/functional/n/no/no_dummy_redefined.txt @@ -0,0 +1,2 @@ +invalid-name:7:0::"Constant name ""value"" doesn't conform to UPPER_CASE naming style" +redefined-outer-name:12:4:clobbering:Redefining name 'value' from outer scope (line 7) |