@@ -369,17 +369,19 @@ def testInit(self):
369
369
self .assertTrue (os .path .isfile (self .dirname + "/config.ini" ))
370
370
self .assertTrue (os .path .isfile (self .dirname + "/schema.py" ))
371
371
372
+ nopath = '/tmp/noSuchDirectory/nodir'
373
+ norealpath = os .path .realpath (nopath + "/.." )
372
374
self .admin = AdminTool ()
373
375
with captured_output () as (out , err ):
374
- sys .argv = ['main' , '-i' , '/tmp/noSuchDirectory/nodir' , 'install' , 'classic' , self .backend ]
376
+ sys .argv = ['main' , '-i' , nopath , 'install' , 'classic' , self .backend ]
375
377
ret = self .admin .main ()
376
378
377
379
out = out .getvalue ().strip ()
378
380
print (ret )
379
381
print (out )
380
382
self .assertEqual (ret , 1 )
381
383
self .assertIn ('Error: Instance home parent directory '
382
- '"/tmp/noSuchDirectory " does not exist' , out )
384
+ '"%s " does not exist' % norealpath , out )
383
385
384
386
def testInitWithConfig_ini (self ):
385
387
from roundup .configuration import CoreConfig
@@ -410,7 +412,8 @@ def testInitWithConfig_ini(self):
410
412
self .assertTrue (os .path .isfile (self .dirname + "/config.ini" ))
411
413
self .assertTrue (os .path .isfile (self .dirname + "/schema.py" ))
412
414
config = CoreConfig (self .dirname )
413
- self .assertEqual (config ['MAIL_DEBUG' ], self .dirname + "/SendMail.LOG" )
415
+ self .assertEqual (config ['MAIL_DEBUG' ],
416
+ os .path .normpath (self .dirname + "/SendMail.LOG" ))
414
417
415
418
def testList (self ):
416
419
''' Note the tests will fail if you run this under pdb.
0 commit comments