File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- from test .test_support import TESTFN , run_unittest , catch_warning
1+ from test .test_support import TESTFN , run_unittest , catch_warning
22
33import unittest
44import os
@@ -187,6 +187,16 @@ def test_sys_path(self):
187187 self .assertEqual (mod .testdata , 'unicode path %i' % i )
188188 unload ("testimport%i" % i )
189189
190+ # http://bugs.python.org/issue1293
191+ def test_trailing_slash (self ):
192+ f = open (os .path .join (self .path , 'test_trailing_slash.py' ), 'w' )
193+ f .write ("testdata = 'test_trailing_slash'" )
194+ f .close ()
195+ sys .path .append (self .path + '/' )
196+ mod = __import__ ("test_trailing_slash" )
197+ self .assertEqual (mod .testdata , 'test_trailing_slash' )
198+ unload ("test_trailing_slash" )
199+
190200def test_main (verbose = None ):
191201 run_unittest (ImportTest , UnicodePathsTests )
192202
You can’t perform that action at this time.
0 commit comments