summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_funcattrs.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-10-19 20:01:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-10-19 20:01:13 (GMT)
commit3d9e481ece356d805ee5658600ef2888e35a5609 (patch)
treef47e7215f5dab6c99da5b0e23872f24a00176137 /Lib/test/test_funcattrs.py
parent358667370346594c0383f1bfa09e0d650fa8832d (diff)
downloadcpython-3d9e481ece356d805ee5658600ef2888e35a5609.zip
cpython-3d9e481ece356d805ee5658600ef2888e35a5609.tar.gz
cpython-3d9e481ece356d805ee5658600ef2888e35a5609.tar.bz2
give explicitly global functions and classes a global __qualname__ (closes #19301)
Diffstat (limited to 'Lib/test/test_funcattrs.py')
-rw-r--r--Lib/test/test_funcattrs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py
index c8ed830..1d8fa13 100644
--- a/Lib/test/test_funcattrs.py
+++ b/Lib/test/test_funcattrs.py
@@ -7,6 +7,9 @@ def global_function():
def inner_function():
class LocalClass:
pass
+ global inner_global_function
+ def inner_global_function():
+ pass
return LocalClass
return lambda: inner_function
@@ -116,6 +119,7 @@ class FunctionPropertiesTest(FuncAttrsTest):
'global_function.<locals>.inner_function')
self.assertEqual(global_function()()().__qualname__,
'global_function.<locals>.inner_function.<locals>.LocalClass')
+ self.assertEqual(inner_global_function.__qualname__, 'inner_global_function')
self.b.__qualname__ = 'c'
self.assertEqual(self.b.__qualname__, 'c')
self.b.__qualname__ = 'd'