diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-05-02 20:15:05 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-05-02 20:15:05 (GMT) |
commit | e2fb98f467c05e089a177564d3077e888498a102 (patch) | |
tree | 29892e1a390e2a6b15a0cd22ad7209bf818eb297 /Doc/whatsnew/2.7.rst | |
parent | 420d4eb1f3d647487a9c1bb855ec298653165624 (diff) | |
download | cpython-e2fb98f467c05e089a177564d3077e888498a102.zip cpython-e2fb98f467c05e089a177564d3077e888498a102.tar.gz cpython-e2fb98f467c05e089a177564d3077e888498a102.tar.bz2 |
Add addCleanup and doCleanups to unittest.TestCase.
Closes issue 5679.
Michael Foord
Diffstat (limited to 'Doc/whatsnew/2.7.rst')
-rw-r--r-- | Doc/whatsnew/2.7.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index dd53f38..3243c0a 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -452,6 +452,13 @@ changes, or look through the Subversion logs for all the details. (Implemented by Antoine Pitrou; :issue:`4444`.) + The methods :meth:`addCleanup` and :meth:`doCleanups` were added. + :meth:`addCleanup` allows you to add cleanup functions that + will be called unconditionally (after :meth:`setUp` if + :meth:`setUp` fails, otherwise after :meth:`tearDown`). This allows + for much simpler resource allocation and deallocation during tests. + :issue:`5679` + A number of new methods were added that provide more specialized tests. Many of these methods were written by Google engineers for use in their test suites; Gregory P. Smith, Michael Foord, and |