예제 #1
0
 def testDirCount(self):
     
     d = RandomTree()
     
     dc = d.dirsCalculation(depth=1, dirsPerDir=0 )
     
     #print "dirs x: %s" % d.dirs()
     
     self.assertEqual( 1, dc )
     
     dc = d.dirsCalculation(depth=1, dirsPerDir=1 )
     
     self.assertEqual( 2, dc )
     
     d.rm()
예제 #2
0
 def depthFunction(self, depth, dirsPerDir, filesPerDir ):
     
     d = RandomTree( depth=depth, 
                     dirsPerDir=dirsPerDir, 
                     filesPerDir=filesPerDir  )
     dirsCalc = d.dirsCalculation(depth, dirsPerDir)
     self.assertEqual( dirsCalc, d.dirsCount())
     self.assertEqual( dirsCalc * filesPerDir, d.filesCount())
     d.rm()