summaryrefslogtreecommitdiff
path: root/pyflakes/test/test_other.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyflakes/test/test_other.py')
-rw-r--r--pyflakes/test/test_other.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyflakes/test/test_other.py b/pyflakes/test/test_other.py
index 42e99ae..aebdcea 100644
--- a/pyflakes/test/test_other.py
+++ b/pyflakes/test/test_other.py
@@ -118,6 +118,12 @@ class Test(TestCase):
def a(): pass
''', m.RedefinedWhileUnused)
+ def test_redefined_function_shadows_variable(self):
+ self.flakes('''
+ x = 1
+ def x(): pass
+ ''', m.RedefinedWhileUnused)
+
def test_redefinedUnderscoreFunction(self):
"""
Test that shadowing a function definition named with underscore doesn't