Skip to content

Commit

Permalink
allow multi hash results in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
flier committed Mar 7, 2019
1 parent c68e6d8 commit 23293ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def do_bench(benchmark, hasher, hash, size=256):
def result():
return h(data)

assert result == hash
if isinstance(hash, list):
assert result in hash
else:
assert result == hash

return do_bench
2 changes: 1 addition & 1 deletion tests/test_t1hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def test_t1ha1_perf(benchmark, hash_bencher):

@pytest.mark.benchmark(group='hash64', disable_gc=True)
def test_t1ha0_perf(benchmark, hash_bencher):
hash_bencher(benchmark, pyhash.t1ha0, 6970451072221114646)
hash_bencher(benchmark, pyhash.t1ha0, [6970451072221114646, 13811823941710697992])

0 comments on commit 23293ac

Please sign in to comment.