File tree 1 file changed +11
-1
lines changed 1 file changed +11
-1
lines changed 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
2
2
3
3
import unittest
4
4
import os
@@ -187,6 +187,16 @@ def test_sys_path(self):
187
187
self .assertEqual (mod .testdata , 'unicode path %i' % i )
188
188
unload ("testimport%i" % i )
189
189
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
+
190
200
def test_main (verbose = None ):
191
201
run_unittest (ImportTest , UnicodePathsTests )
192
202
You can’t perform that action at this time.
0 commit comments