Example #1
0
def compare(data0, data1, algorithm=None):
    assert jsonhash.hash(data0, algorithm).hexdigest() \
           == jsonhash.hash(data1, algorithm).hexdigest()

    # start two subprocesses with different pythonhashseeds to change dict ordering
    assert in_subprocess(data0, 123) == in_subprocess(data1, 321)
def main():
    for example in EXAMPLES:
        h = jsonhash.hash(example)
        print h.hexdigest()