mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
excellent place for assertRaises
This commit is contained in:
parent
be6210363e
commit
b45c7087aa
1 changed files with 1 additions and 6 deletions
|
@ -1631,12 +1631,7 @@ order (MRO) for bases """
|
||||||
for attr, obj in env.items():
|
for attr, obj in env.items():
|
||||||
setattr(X, attr, obj)
|
setattr(X, attr, obj)
|
||||||
setattr(X, name, ErrDescr())
|
setattr(X, name, ErrDescr())
|
||||||
try:
|
self.assertRaises(MyException, runner, X())
|
||||||
runner(X())
|
|
||||||
except MyException:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
self.fail("{0!r} didn't raise".format(name))
|
|
||||||
|
|
||||||
def test_specials(self):
|
def test_specials(self):
|
||||||
# Testing special operators...
|
# Testing special operators...
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue