This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients flox, ncoghlan
Date 2010-03-16.12:45:35
SpamBayes Score 1.0348722e-07
Marked as misclassified No
Message-id <1268743539.11.0.544873836546.issue8155@psf.upfronthosting.co.za>
In-reply-to
Content
A bug report for the incompatibility I was trying to explain on the checkins list. The test_support module is the only part of the regression test suite that is officially documented, so we can't go changing behaviour that is visible to third parties at will.

Python 2.6.5rc2 (release26-maint:78987, Mar 16 2010, 19:48:42)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from test.test_support import check_warnings
>>> with check_warnings():
...   pass
...
>>>

Python 2.7a4+ (trunk:78987, Mar 16 2010, 19:48:39)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from test.test_support import check_warnings
>>> with check_warnings():
...   pass
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/ncoghlan/devel/python/Lib/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/home/ncoghlan/devel/python/Lib/test/test_support.py", line 568, in _filterwarnings
    missing[0])
AssertionError: filter ('', Warning) did not catch any warning
>>>

Third party test suites may want to use check_warnings() for both 2.6 and 2.7 and this change makes it unnecessarily difficult for them to do so.

Fixing this should just be a matter of flipping the default value of the new "quiet" parameter to True and updating the tests and documentation accordingly.
History
Date User Action Args
2010-03-16 12:45:39ncoghlansetrecipients: + ncoghlan, flox
2010-03-16 12:45:39ncoghlansetmessageid: <1268743539.11.0.544873836546.issue8155@psf.upfronthosting.co.za>
2010-03-16 12:45:37ncoghlanlinkissue8155 messages
2010-03-16 12:45:35ncoghlancreate