From 0f36573f10fb1125042ada81b9feaee0c5b8a9ff Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 8 Feb 2010 22:07:38 +0000 Subject: Use non-deprecated method in the example --- Doc/library/unittest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 051c730..bc7062c 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 -- cgit v0.12