Message101164
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. |
|
Date |
User |
Action |
Args |
2010-03-16 12:45:39 | ncoghlan | set | recipients:
+ ncoghlan, flox |
2010-03-16 12:45:39 | ncoghlan | set | messageid: <1268743539.11.0.544873836546.issue8155@psf.upfronthosting.co.za> |
2010-03-16 12:45:37 | ncoghlan | link | issue8155 messages |
2010-03-16 12:45:35 | ncoghlan | create | |
|