[Python-checkins] python/dist/src/Lib UserString.py,1.13,1.14

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Tue, 30 Jul 2002 16:26:02 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv6095/Lib

Modified Files:
	UserString.py 
Log Message:
Complete the absolute import patch for the test suite.  All relative
imports of test modules now import from the test package.  Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.).  Also did a general
code cleanup to remove all "from test.test_support import *"'s.  Other
from...import *'s weren't changed.


Index: UserString.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/UserString.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** UserString.py	20 May 2002 14:48:16 -0000	1.13
--- UserString.py	30 Jul 2002 23:26:00 -0000	1.14
***************
*** 174,182 ****
      import os
      called_in_dir, called_as = os.path.split(sys.argv[0])
-     called_in_dir = os.path.abspath(called_in_dir)
      called_as, py = os.path.splitext(called_as)
-     sys.path.append(os.path.join(called_in_dir, 'test'))
      if '-q' in sys.argv:
!         import test_support
          test_support.verbose = 0
!     __import__('test_' + called_as.lower())
--- 174,180 ----
      import os
      called_in_dir, called_as = os.path.split(sys.argv[0])
      called_as, py = os.path.splitext(called_as)
      if '-q' in sys.argv:
!         from test import test_support
          test_support.verbose = 0
!     __import__('test.test_' + called_as.lower())