mirror of https://github.com/python/cpython
Use non-deprecated method in the example
This commit is contained in:
parent
50dcfc5d7d
commit
0f36573f10
|
@ -816,7 +816,7 @@ Test cases
|
|||
If only the *exception* argument is given, returns a context manager so
|
||||
that the code under test can be written inline rather than as a function::
|
||||
|
||||
with self.failUnlessRaises(some_error_class):
|
||||
with self.assertRaises(SomeException):
|
||||
do_something()
|
||||
|
||||
.. versionchanged:: 3.1
|
||||
|
|
Loading…
Reference in New Issue