Move test.test_support.catch_warning() to the warnings module, rename it
commitdc1d1ad3be7bc915eb83ff1138a4db3251e3f330
authorbrett.cannon <brett.cannon@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 2 Sep 2008 01:25:16 +0000 (2 01:25 +0000)
committerbrett.cannon <brett.cannon@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 2 Sep 2008 01:25:16 +0000 (2 01:25 +0000)
treef1c88baa3c400d28a8c035120923da72d3852ca1
parentacaa7bd32533dd6b72d987219bb24962f4323d02
Move test.test_support.catch_warning() to the warnings module, rename it
catch_warnings(), and clean up the API.

While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.

Closes issue 3602.
Code review by Benjamin Peterson.

git-svn-id: http://svn.python.org/projects/python/trunk@66135 6015fed2-1504-0410-9fe1-9d1591cc4771
Doc/library/warnings.rst
Lib/BaseHTTPServer.py
Lib/asynchat.py
Lib/cgi.py
Lib/httplib.py
Lib/mimetools.py
Lib/test/test_support.py
Lib/test/test_warnings.py
Lib/warnings.py
Misc/NEWS
Python/_warnings.c