Don't call resetwarnings(). Be more restrictive in what we filter out

instead.
This commit is contained in:
Guido van Rossum 2001-12-15 18:04:10 +00:00
parent 2b8235e485
commit 796e1e0b30
1 changed files with 1 additions and 3 deletions

View 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: