mirror of
https://github.com/python/cpython
synced 2026-09-29 09:25:29 +03:00
Use non-deprecated method in the example
This commit is contained in:
parent
50dcfc5d7d
commit
0f36573f10
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue