summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-01 20:11:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-01 20:11:06 (GMT)
commit4de2263616bce36853ab4f44b7b5892610651ae5 (patch)
tree0bfb2c0148d2dece04e1338cd15fd6196fab83d0 /Lib/test/test_import.py
parente18f21c7d423e2f25bf87d3aedc330901c3f1c60 (diff)
downloadcpython-4de2263616bce36853ab4f44b7b5892610651ae5.zip
cpython-4de2263616bce36853ab4f44b7b5892610651ae5.tar.gz
cpython-4de2263616bce36853ab4f44b7b5892610651ae5.tar.bz2
Removed non ASCII text from test as requested by Guido. Sorry :/
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 71f5976..9c44b87 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -223,8 +223,7 @@ class ImportTest(unittest.TestCase):
warnings.simplefilter('error', ImportWarning)
self.assertRaises(ImportWarning, __import__, "site-packages")
-class UnicodePathsTests(unittest.TestCase):
- SAMPLES = ('test', 'testäöüß', 'testéè', 'test°³²')
+class PathsTests(unittest.TestCase):
path = TESTFN
def setUp(self):
@@ -235,23 +234,6 @@ class UnicodePathsTests(unittest.TestCase):
shutil.rmtree(self.path)
sys.path = self.syspath
- def test_sys_path(self):
- for i, subpath in enumerate(self.SAMPLES):
- path = os.path.join(self.path, subpath)
- os.mkdir(path)
- self.failUnless(os.path.exists(path), os.listdir(self.path))
- f = open(os.path.join(path, 'testimport%i.py' % i), 'w')
- f.write("testdata = 'unicode path %i'\n" % i)
- f.close()
- sys.path.append(path)
- try:
- mod = __import__("testimport%i" % i)
- except ImportError:
- print >>sys.stderr, path
- raise
- self.assertEqual(mod.testdata, 'unicode path %i' % i)
- unload("testimport%i" % i)
-
# http://bugs.python.org/issue1293
def test_trailing_slash(self):
f = open(os.path.join(self.path, 'test_trailing_slash.py'), 'w')
@@ -263,7 +245,7 @@ class UnicodePathsTests(unittest.TestCase):
unload("test_trailing_slash")
def test_main(verbose=None):
- run_unittest(ImportTest, UnicodePathsTests)
+ run_unittest(ImportTest, PathsTests)
if __name__ == '__main__':
test_main()