From bcf6ca13454cc90c65092fb11063bbaf1c09a268 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 30 Dec 2009 23:15:14 +0000 Subject: [PATCH] rewrite for inferior assertRaises --- Lib/test/test_descr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 67e58ca1579..bc5edef8571 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__...