Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24095 closed Bug (fixed)

WarningLoggerTests leaks a logging filters

Reported by: Tim Graham Owned by: Tim Graham
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It seems that because the warnings.filterwarnings('always') in the setUp() method isn't in a warnings.catch_warnings() block, that filter isn't cleaned up.

Running:

python -Wall runtests.py logging_tests.tests.WarningLoggerTests template_tests.syntax_tests.test_numpy

results in numpy deprecation warnings even though they are explicitly silenced in the numpy tests.

Change History (3)

comment:1 by Claude Paroz, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In ade985999657eaef6a9510c2aeba9b2196d7bf6e:

Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.

comment:3 by Tim Graham <timograham@…>, 10 years ago

In 557c514f900b1280cfd4a892be893dd4c338ae74:

[1.7.x] Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.

Backport of ade985999657eaef6a9510c2aeba9b2196d7bf6e from master

Note: See TracTickets for help on using tickets.
Back to Top