summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-12-30 23:15:14 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-12-30 23:15:14 (GMT)
commitbcf6ca13454cc90c65092fb11063bbaf1c09a268 (patch)
tree9f705b725bb78fe6b4868a98bcb37323a3efa5d5 /Lib
parent788864f4838dc2d79a2403755656e00fc698a5a2 (diff)
downloadcpython-bcf6ca13454cc90c65092fb11063bbaf1c09a268.zip
cpython-bcf6ca13454cc90c65092fb11063bbaf1c09a268.tar.gz
cpython-bcf6ca13454cc90c65092fb11063bbaf1c09a268.tar.bz2
rewrite for inferior assertRaises
Diffstat (limited to 'Lib')
-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 67e58ca..bc5edef 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1144,8 +1144,12 @@ order (MRO) for bases """
class X(object):
__slots__ = "a"
- with self.assertRaises(AttributeError):
+ try:
del X().a
+ except AttributeError:
+ pass
+ else:
+ self.fail("didn't raise AttributeError")
def test_slots_special(self):
# Testing __dict__ and __weakref__ in __slots__...