We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96e0da8 commit 2d07acfCopy full SHA for 2d07acf
1 file changed
pyflakes/test/test_undefined_names.py
@@ -446,6 +446,33 @@ def _worker():
446
o = False
447
''')
448
449
+ def test_delFunctionScope(self):
450
+ """
451
+ Global names should not be seen if there are same names
452
+ defined in function.
453
454
+ self.flakes('''
455
+ a = 1
456
+ def func():
457
+ a = 2
458
+ del a
459
+ a
460
+ ''', m.UndefinedName)
461
+
462
+ def test_delMethodScope(self):
463
464
465
+ defined in method.
466
467
468
469
+ class A(object):
470
+ def method(self):
471
472
473
474
475
476
def test_globalFromNestedScope(self):
477
"""Global names are available from nested scopes."""
478
self.flakes('''
0 commit comments