Use non-deprecated method in the example
authorEzio Melotti <ezio.melotti@gmail.com>
Mon, 8 Feb 2010 22:07:38 +0000 (22:07 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Mon, 8 Feb 2010 22:07:38 +0000 (22:07 +0000)
Doc/library/unittest.rst

index 051c730b02f38f9222ae23fb5797be162d585d27..bc7062c6211c37148f4e56a52880ed53537a6b76 100644 (file)
@@ -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