diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-10-19 20:01:13 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-10-19 20:01:13 (GMT) |
commit | 3d9e481ece356d805ee5658600ef2888e35a5609 (patch) | |
tree | f47e7215f5dab6c99da5b0e23872f24a00176137 /Lib/test/test_descr.py | |
parent | 358667370346594c0383f1bfa09e0d650fa8832d (diff) | |
download | cpython-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_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index f0d6d1c..90efb27 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4517,6 +4517,11 @@ order (MRO) for bases """ self.assertRaises(TypeError, type.__dict__['__qualname__'].__set__, str, 'Oink') + global Y + class Y: + pass + self.assertEqual(Y.__qualname__, 'Y') + def test_qualname_dict(self): ns = {'__qualname__': 'some.name'} tp = type('Foo', (), ns) |