diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_import.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 7bb122d..bb56072 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -1,4 +1,4 @@ -from test.test_support import TESTFN, run_unittest, catch_warning +from test.test_support import TESTFN, run_unittest, catch_warning import unittest import os @@ -187,6 +187,16 @@ class UnicodePathsTests(unittest.TestCase): 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') + f.write("testdata = 'test_trailing_slash'") + f.close() + sys.path.append(self.path+'/') + mod = __import__("test_trailing_slash") + self.assertEqual(mod.testdata, 'test_trailing_slash') + unload("test_trailing_slash") + def test_main(verbose=None): run_unittest(ImportTest, UnicodePathsTests) |