summaryrefslogtreecommitdiffstats
path: root/Lib/UserString.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-07-30 23:27:12 (GMT)
committerBarry Warsaw <barry@python.org>2002-07-30 23:27:12 (GMT)
commit408b6d34de2b1a6ba690557def435adce9314184 (patch)
tree9d4e40110765646f7033a740641ef67750d17b91 /Lib/UserString.py
parent1bc894b1333ff0fd0d8b175f6748798e5fd08aed (diff)
downloadcpython-408b6d34de2b1a6ba690557def435adce9314184.zip
cpython-408b6d34de2b1a6ba690557def435adce9314184.tar.gz
cpython-408b6d34de2b1a6ba690557def435adce9314184.tar.bz2
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.
Diffstat (limited to 'Lib/UserString.py')
-rwxr-xr-xLib/UserString.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index ed90b8d..8209820 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -173,10 +173,8 @@ if __name__ == "__main__":
# execute the regression test to stdout, if called as a script:
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
+ from test import test_support
test_support.verbose = 0
- __import__('test_' + called_as.lower())
+ __import__('test.test_' + called_as.lower())