Kaydet (Commit) 1d1a4001 authored tarafından Christian Heimes's avatar Christian Heimes

Added unit test for bug http://bugs.python.org/issue1293

üst 90333396
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment