From: Ezio Melotti Date: Mon, 8 Feb 2010 22:07:38 +0000 (+0000) Subject: Use non-deprecated method in the example X-Git-Tag: v3.1.2rc1~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f36573f10fb1125042ada81b9feaee0c5b8a9ff;p=thirdparty%2FPython%2Fcpython.git Use non-deprecated method in the example --- diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 051c730b02f3..bc7062c6211c 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