[Python-checkins] r67979 - in python/trunk: Doc/library/unittest.rst Lib/test/test_unittest.py Lib/unittest.py Misc/NEWS

Nick Coghlan ncoghlan at gmail.com
Sun Dec 28 22:57:12 CET 2008


Nick Coghlan wrote:
> antoine.pitrou wrote:
>> Author: antoine.pitrou
>> Date: Sun Dec 28 15:09:36 2008
>> New Revision: 67979
>>
>> Log:
>> Issue #4444: Allow assertRaises() to be used as a context handler.
>>
>>
>>
>> Modified:
>>    python/trunk/Doc/library/unittest.rst
>>    python/trunk/Lib/test/test_unittest.py
>>    python/trunk/Lib/unittest.py
>>    python/trunk/Misc/NEWS
>>
>> Modified: python/trunk/Doc/library/unittest.rst
>> ==============================================================================
> <snip>
>> +   .. versionchanged:: 2.2
>> +
>> +      If *callable* is omitted or None, 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):
>> +            do_something()
> <snip>
> 
> The version changed should say 2.7, not 2.2

Oops, already fixed in a later checkin. Never mind.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-checkins mailing list