From: Guido van Rossum Date: Sat, 15 Dec 2001 18:04:10 +0000 (+0000) Subject: Don't call resetwarnings(). Be more restrictive in what we filter out X-Git-Tag: v2.2.1c1~343 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=796e1e0b30cda1362b0c6b89a079ad0cbf8804be;p=python Don't call resetwarnings(). Be more restrictive in what we filter out instead. --- diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py index dde169a05d..bb29f8b9a7 100644 --- a/Lib/test/test_scope.py +++ b/Lib/test/test_scope.py @@ -1,7 +1,7 @@ from test_support import verify, TestFailed, check_syntax import warnings -warnings.filterwarnings("ignore", "import *") +warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "") print "1. simple nesting" @@ -491,8 +491,6 @@ except TypeError: else: print "exec should have failed, because code contained free vars" -warnings.resetwarnings() - print "21. list comprehension with local variables" try: