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