]> granicus.if.org Git - python/commitdiff
Don't call resetwarnings(). Be more restrictive in what we filter out
authorGuido van Rossum <guido@python.org>
Sat, 15 Dec 2001 18:04:10 +0000 (18:04 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 15 Dec 2001 18:04:10 +0000 (18:04 +0000)
instead.

Lib/test/test_scope.py

index dde169a05d54a36f8865d08aa341c58bbc8cd0fd..bb29f8b9a75aeab431886b639497214dfadf7bac 100644 (file)
@@ -1,7 +1,7 @@
 from test_support import verify, TestFailed, check_syntax
 
 import warnings
-warnings.filterwarnings("ignore", "import *")
+warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "<string>")
 
 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: