Пример #1
0
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()
Пример #2
0
def test_byte_test_ok(n, byte):
    assert reduce(lib.byte_test(byte)) == ok
Пример #3
0
def test_byte_test(expected, bits):
    byte = lib.byte_make(*bits)
    assert reduce(lib.byte_test(byte)) == expected