def test_tuple_for_hash():
    for size in [100, 500, 720, 1000]:
        bcv = make_bcv(size)
        headers = make_headers(size)
        for idx, header in enumerate(headers):
            the_hash = header.hash()
            the_tuple = bcv.tuple_for_hash(the_hash)
            assert the_tuple[0] == idx
            assert the_tuple[1] == the_hash
        bcv.winnow()
        items = BlockChainView._halsies_indices(1-size)
        for idx, header in enumerate(headers):
            the_hash = header.hash()
            the_tuple = bcv.tuple_for_hash(the_hash)
            if idx in items:
                assert the_tuple[0] == idx
                assert the_tuple[1] == the_hash
            else:
                assert the_tuple == None
dataset/ETHPy150Open richardkiss/pycoinnet/tests/util/test_BlockChainView.py/test_tuple_for_hash/swapped operands of `-`