Kaydet (Commit) b45c7087 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

excellent place for assertRaises

üst be621036
......@@ -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...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment