diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-08 22:07:38 +0000 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-08 22:07:38 +0000 |
| commit | 0f36573f10fb1125042ada81b9feaee0c5b8a9ff (patch) | |
| tree | da7f9afc1e9b71892d796f51f383b0ec8b31419e /Doc/library/unittest.rst | |
| parent | 50dcfc5d7d385982bdf847cdaa4d58730df96d6a (diff) | |
| download | cpython-git-0f36573f10fb1125042ada81b9feaee0c5b8a9ff.tar.gz | |
Use non-deprecated method in the example
Diffstat (limited to 'Doc/library/unittest.rst')
| -rw-r--r-- | Doc/library/unittest.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 051c730b02..bc7062c621 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -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 |
