check to make sure the attribute is a string (#14334)
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 4050524..28dfbff 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4554,6 +4554,9 @@
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__")