excellent place for assertRaises

This commit is contained in:
Benjamin Peterson 2011-05-24 19:31:01 -05:00
parent be6210363e
commit b45c7087aa
1 changed files with 1 additions and 6 deletions

View File

@ -1631,12 +1631,7 @@ order (MRO) for bases """
for attr, obj in env.items():
setattr(X, attr, obj)
setattr(X, name, ErrDescr())
try:
runner(X())
except MyException:
pass
else:
self.fail("{0!r} didn't raise".format(name))
self.assertRaises(MyException, runner, X())
def test_specials(self):
# Testing special operators...