[Python-checkins] python/dist/src/Lib/test test_site.py,1.2,1.3

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat Jun 26 23:02:21 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23094
Modified Files:
	test_site.py 
Log Message:
* Silence a test failure that resulted when test_site was run by 
 regrtest.py after it ran test_frozen. This test was really only
 designed to be run immediately after startup. Afterwards, other
 modules could be loaded when had not been fixed-up by site.py
 Took the chicken way out and only tested those modules known to
 be imported by site.py.
* Normalized whitespace.
Index: test_site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_site.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_site.py	8 Jun 2004 18:25:48 -0000	1.2
--- test_site.py	27 Jun 2004 03:02:18 -0000	1.3
***************
*** 22,29 ****
 class HelperFunctionsTests(unittest.TestCase):
 """Tests for helper functions.
! 
 The setting of the encoding (set using sys.setdefaultencoding) used by
 the Unicode implementation is not tested.
! 
 """
 
--- 22,29 ----
 class HelperFunctionsTests(unittest.TestCase):
 """Tests for helper functions.
! 
 The setting of the encoding (set using sys.setdefaultencoding) used by
 the Unicode implementation is not tested.
! 
 """
 
***************
*** 35,39 ****
 """Restore sys.path"""
 sys.path = self.sys_path
! 
 def test_makepath(self):
 # Test makepath() have an absolute path for its first return value
--- 35,39 ----
 """Restore sys.path"""
 sys.path = self.sys_path
! 
 def test_makepath(self):
 # Test makepath() have an absolute path for its first return value
***************
*** 56,60 ****
 "%s from sys.path not found in set returned "
 "by _init_pathinfo(): %s" % (entry, dir_set))
! 
 def test_addpackage(self):
 # Make sure addpackage() imports if the line starts with 'import',
--- 56,60 ----
 "%s from sys.path not found in set returned "
 "by _init_pathinfo(): %s" % (entry, dir_set))
! 
 def test_addpackage(self):
 # Make sure addpackage() imports if the line starts with 'import',
***************
*** 68,72 ****
 finally:
 cleanuppth(dir_path, file_name, new_dir)
! 
 def test_addsitedir(self):
 dir_path, file_name, new_dir = createpth()
--- 68,72 ----
 finally:
 cleanuppth(dir_path, file_name, new_dir)
! 
 def test_addsitedir(self):
 dir_path, file_name, new_dir = createpth()
***************
*** 121,129 ****
 # Handled by abs__file__()
 site.abs__file__()
! for module in sys.modules.values():
 try:
! self.failUnless(os.path.isabs(module.__file__))
 except AttributeError:
 continue
 
 def test_no_duplicate_paths(self):
--- 121,132 ----
 # Handled by abs__file__()
 site.abs__file__()
! for module in (sys, os, __builtin__):
 try:
! self.failUnless(os.path.isabs(module.__file__), `module`)
 except AttributeError:
 continue
+ # We could try everything in sys.modules; however, when regrtest.py
+ # runs something like test_frozen before test_site, then we will
+ # be testing things loaded *after* test_site did path normalization
 
 def test_no_duplicate_paths(self):


More information about the Python-checkins mailing list

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