[Python-checkins] CVS: python/dist/src/Lib/test test_os.py,1.3,1.4

Jeremy Hylton jhylton@users.sourceforge.net
2001年8月20日 13:10:03 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv1068
Modified Files:
	test_os.py 
Log Message:
Silence warnings during test_os
Index: test_os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_os.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_os.py	2001年07月21日 01:41:30	1.3
--- test_os.py	2001年08月20日 20:10:01	1.4
***************
*** 5,8 ****
--- 5,9 ----
 import os
 import unittest
+ import warnings
 
 from test_support import TESTFN, run_unittest
***************
*** 30,33 ****
--- 31,36 ----
 if not hasattr(os, "tempnam"):
 return
+ warnings.filterwarnings("ignore", "tempnam", RuntimeWarning,
+ "test_os")
 self.check_tempfile(os.tempnam())
 
***************
*** 52,55 ****
--- 55,60 ----
 if not hasattr(os, "tmpnam"):
 return
+ warnings.filterwarnings("ignore", "tmpnam", RuntimeWarning,
+ "test_os")
 self.check_tempfile(os.tmpnam())
 

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