summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-01-12 15:34:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-01-12 15:34:01 (GMT)
commit477ba919c158ba6e7a4b85d15f2e2b8820272cd9 (patch)
tree9134a7531c5ef7fddc917adb8a15d21ced72a586 /Lib/test/test_descr.py
parent5e8dada4918e9baa023b9262127d60a6f9067818 (diff)
downloadcpython-477ba919c158ba6e7a4b85d15f2e2b8820272cd9.zip
cpython-477ba919c158ba6e7a4b85d15f2e2b8820272cd9.tar.gz
cpython-477ba919c158ba6e7a4b85d15f2e2b8820272cd9.tar.bz2
don't segfault on deleting __abstractmethods__ #10892
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index a81c218..914b249 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4224,12 +4224,16 @@ order (MRO) for bases """
self.assertRaises(AttributeError, getattr, EvilGetattribute(), "attr")
- def test_type_has_no_abstractmethods(self):
+ def test_abstractmethods(self):
# type pretends not to have __abstractmethods__.
self.assertRaises(AttributeError, getattr, type, "__abstractmethods__")
class meta(type):
pass
self.assertRaises(AttributeError, getattr, meta, "__abstractmethods__")
+ class X(object):
+ pass
+ with self.assertRaises(AttributeError):
+ del X.__abstractmethods__
class DictProxyTests(unittest.TestCase):