diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-10-20 21:50:28 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-10-20 21:50:28 (GMT) |
commit | 6b4f7803f8be4b90c22dcf3737f4144cabff4d70 (patch) | |
tree | c0db1b6ecbe9b239c7fa6d741fb82eaf71a0fd7e /Lib/test/test_funcattrs.py | |
parent | a7a150c7c65e8022027ed0f48cd6f867fcf31949 (diff) | |
download | cpython-6b4f7803f8be4b90c22dcf3737f4144cabff4d70.zip cpython-6b4f7803f8be4b90c22dcf3737f4144cabff4d70.tar.gz cpython-6b4f7803f8be4b90c22dcf3737f4144cabff4d70.tar.bz2 |
cleanup the construction of __qualname__ (closes #19301 again)
Diffstat (limited to 'Lib/test/test_funcattrs.py')
-rw-r--r-- | Lib/test/test_funcattrs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 1d8fa13..5094f7b 100644 --- a/Lib/test/test_funcattrs.py +++ b/Lib/test/test_funcattrs.py @@ -9,7 +9,9 @@ def global_function(): pass global inner_global_function def inner_global_function(): - pass + def inner_function2(): + pass + return inner_function2 return LocalClass return lambda: inner_function @@ -120,6 +122,7 @@ class FunctionPropertiesTest(FuncAttrsTest): self.assertEqual(global_function()()().__qualname__, 'global_function.<locals>.inner_function.<locals>.LocalClass') self.assertEqual(inner_global_function.__qualname__, 'inner_global_function') + self.assertEqual(inner_global_function().__qualname__, 'inner_global_function.<locals>.inner_function2') self.b.__qualname__ = 'c' self.assertEqual(self.b.__qualname__, 'c') self.b.__qualname__ = 'd' |