summaryrefslogtreecommitdiff
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index b1549ef43e..ab9e812a98 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -647,6 +647,13 @@ result2 = h()
self.assertEqual(2, global_ns["result2"])
self.assertEqual(9, global_ns["result9"])
+ def testTopIsNotSignificant(self):
+ # See #9997.
+ def top(a):
+ pass
+ def b():
+ global a
+
def test_main():
with check_warnings(("import \* only allowed at module level",