[Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.18,1.19

Jeremy Hylton jhylton@users.sourceforge.net
2001年8月07日 09:38:21 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv379
Modified Files:
	test_scope.py 
Log Message:
silence warnings about import *
Index: test_scope.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** test_scope.py	2001年07月30日 21:55:29	1.18
--- test_scope.py	2001年08月07日 16:38:19	1.19
***************
*** 1,4 ****
--- 1,7 ----
 from test.test_support import verify, TestFailed, check_syntax
 
+ import warnings
+ warnings.filterwarnings("ignore", "import *")
+ 
 print "1. simple nesting"
 
***************
*** 228,231 ****
--- 231,235 ----
 # and verify a few cases that should work
 
+ exec """
 def noproblem1():
 from string import *
***************
*** 242,245 ****
--- 246,250 ----
 global y
 y = x
+ """
 
 print "12. lambdas"
***************
*** 479,480 ****
--- 484,487 ----
 else:
 print "eval() should have failed, because code contained free vars"
+ 
+ warnings.resetwarnings()

AltStyle によって変換されたページ (->オリジナル) /