mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Added unit test for bug http://bugs.python.org/issue1293
This commit is contained in:
parent
9033339673
commit
1d1a400164
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue