rewrite for inferior assertRaises

This commit is contained in:
Benjamin Peterson 2009-12-30 23:15:14 +00:00
parent 788864f483
commit bcf6ca1345
1 changed files with 5 additions and 1 deletions

View File

@ -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__...