def report_short(stats): print("{}:".format(stats.root)) print(" {} files {} dirs {} links {} mounts {} errors {} size".format( stats.regs, stats.dirs, stats.links, stats.mounts, stats.errors, bytes(stats.size), )) for stat in stats.data.values(): print(" {} {}".format(stat.value, stat.name))
def report_long(stats): print("{}:".format(stats.root)) print(" {} files {} dirs {} links {} mounts {} errors {} size".format( stats.regs, stats.dirs, stats.links, stats.mounts, stats.errors, bytes(stats.size), )) for stat in stats.data.values(): print(" {} {}".format(stat.value, stat.name)) if isinstance(stat, StatFiles): for path in stat.files: print(" {}".format(path))
def test_bytes_1(): """ test bytes with zero value """ bytes(0)