def profile(count=256): """Run a reduce(lib.gyte_test(lib.byte_table[n])) for the first count bytes.""" examples = sorted(lib.byte_table.items()) for n, byte in examples[:count]: engine.reduce(lib.byte_test(byte)) sys.stdout.write('.') sys.stdout.flush()
def test_byte_test_ok(n, byte): assert reduce(lib.byte_test(byte)) == ok
def test_byte_test(expected, bits): byte = lib.byte_make(*bits) assert reduce(lib.byte_test(byte)) == expected