diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-16 14:32:59 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-16 14:32:59 (GMT) |
commit | 16d84ac355c532a1e7d25cf75e0b577923de2856 (patch) | |
tree | 975ca5f98cf91f599673cf4a9e7477d11667b989 /Lib/test/test_descr.py | |
parent | 3fb05a90cefe29bad82c87336fa32de36e6add3d (diff) | |
download | cpython-16d84ac355c532a1e7d25cf75e0b577923de2856.zip cpython-16d84ac355c532a1e7d25cf75e0b577923de2856.tar.gz cpython-16d84ac355c532a1e7d25cf75e0b577923de2856.tar.bz2 |
check to make sure the attribute is a string (#14334)
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 4aeb77f..141d791 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4393,6 +4393,9 @@ order (MRO) for bases """ self.assertRaises(AttributeError, getattr, EvilGetattribute(), "attr") + def test_type___getattribute__(self): + self.assertRaises(TypeError, type.__getattribute__, list, type) + def test_abstractmethods(self): # type pretends not to have __abstractmethods__. self.assertRaises(AttributeError, getattr, type, "__abstractmethods__") |