]> granicus.if.org Git - python/commitdiff
silence warnings about import *
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 7 Aug 2001 16:38:19 +0000 (16:38 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 7 Aug 2001 16:38:19 +0000 (16:38 +0000)
Lib/test/test_scope.py

index 58dd637505b1cbe09143375a6f1bfac7bb694200..6eec3b531962a3453fa41c3c39265ef29eee1380 100644 (file)
@@ -1,5 +1,8 @@
 from test.test_support import verify, TestFailed, check_syntax
 
+import warnings
+warnings.filterwarnings("ignore", "import *")
+
 print "1. simple nesting"
 
 def make_adder(x):
@@ -227,6 +230,7 @@ def f():
 
 # and verify a few cases that should work
 
+exec """
 def noproblem1():
     from string import *
     f = lambda x:x
@@ -241,6 +245,7 @@ def noproblem3():
     def f(x):
         global y
         y = x
+"""
 
 print "12. lambdas"
 
@@ -478,3 +483,5 @@ except TypeError:
     pass
 else:
     print "eval() should have failed, because code contained free vars"
+
+warnings.resetwarnings()