Example #1
0
 def testWriteDirlistToFile( self ):
     ''' Dirlist : test writes the dirlist to file '''
     # cleanup before we start
     if os.path.isfile( os.path.join( Data1Dir, '.dirlist.md5' ) ):
         os.remove( os.path.join( Data1Dir, '.dirlist.md5' ) )
     
     dl = Dirlist( Data1Dir )
     self.assertFalse( dl.isDirlistPresent() )  # prerequisite for the test
     
     dl.writeDirlistToFile( Data1Result )
     self.assertEqual( dl.readDirlistFromFile(), Data1Result, "Bad data read from dirlist file" )
     
     # cleanup
     os.remove( os.path.join( Data1Dir, '.dirlist.md5' ) )
Example #2
0
 def testGetDirlistFromFile( self ):
     ''' Dirlist : test reads the dirlist from file '''
     dl = Dirlist( Data2Dir )
     self.assertEqual( dl.readDirlistFromFile(), Data2Result )