def get_dir_size_test(self): """Test the getDirSize.""" # dev null should have a size == 0 self.assertEqual(iutil.getDirSize('/dev/null'), 0) # incorrect path should also return 0 self.assertEqual(iutil.getDirSize('/dev/null/foo'), 0) # check if an int is always returned self.assertIsInstance(iutil.getDirSize('/dev/null'), int) self.assertIsInstance(iutil.getDirSize('/dev/null/foo'), int)
def spaceRequired(self): return Size(iutil.getDirSize("/") * 1024)
def spaceRequired(self): return Size(iutil.getDirSize("/")*1024)
def spaceRequired(self): return Size(bytes=iutil.getDirSize( os.path.realpath(INSTALL_TREE)) * 1024)