[Python-checkins] r78111 - python/branches/release31-maint/Doc/library/unittest.rst

ezio.melotti python-checkins at python.org
Mon Feb 8 23:07:38 CET 2010


Author: ezio.melotti
Date: Mon Feb 8 23:07:38 2010
New Revision: 78111
Log:
Use non-deprecated method in the example
Modified:
 python/branches/release31-maint/Doc/library/unittest.rst
Modified: python/branches/release31-maint/Doc/library/unittest.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/unittest.rst	(original)
+++ python/branches/release31-maint/Doc/library/unittest.rst	Mon Feb 8 23:07:38 2010
@@ -816,7 +816,7 @@
 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


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /