Example #1
0
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))
Example #2
0
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))
Example #3
0
def test_bytes_1():
    """ test bytes with zero value """
    bytes(0)