Title: warnings.filterwarnings() not isolated between tests
Type: Stage:
Components: Tests Versions: Python 2.6
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, jerry.seutter
Priority: low Keywords: patch

Created on 2008-03-18 20:56 by jerry.seutter, last changed 2008-03-19 23:02 by brett.cannon. This issue is now closed.

File name Uploaded Description Edit
warnings_fix.patch jerry.seutter, 2008-03-18 20:56 Patch against trunk, rev 0.
warnings_fix_v2.patch jerry.seutter, 2008-03-18 23:58 Patch against trunk, rev 2.
Messages (3)
msg63984 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2008-03-18 20:56
Some tests were not cleaning up warning filters.  Fixed the problem by
making restore default filters before each module is executed.

This exposed other errors which are also fixed in the patch.

The patch only affects test files.
msg64019 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2008-03-18 23:58
Improved version of the patch that uses context manager to restore old
warning state
msg64118 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-19 23:02
Fixed in revision 61651.
Date User Action Args
2008-03-19 23:02:00brett.cannonsetstatus: open -> closed
keywords: patch, patch
resolution: accepted
messages: + msg64118
nosy: + brett.cannon
2008-03-18 23:58:49jerry.seuttersetkeywords: patch, patch
files: + warnings_fix_v2.patch
messages: + msg64019
2008-03-18 20:56:43jerry.seuttercreate