From a7373972b4d6e379c50aa78b81ce979b3ad495ef Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 6 May 2024 16:00:10 -0700 Subject: [PATCH] Increase expected standard deviation size * Update .gitignore Signed-off-by: Jono Yang --- .gitignore | 2 +- tests/test_halohash.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2d48196..d8f76fc 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,7 @@ doc/pyvenv.cfg pyvenv.cfg # Various junk and temp files -.DS_Store +*.DS_Store *~ .*.sw[po] .build diff --git a/tests/test_halohash.py b/tests/test_halohash.py index 8af259c..ba07464 100644 --- a/tests/test_halohash.py +++ b/tests/test_halohash.py @@ -64,8 +64,9 @@ def check_results( for exp, res in zip(expected, results): assert exp[key1] == res[key1] expected_mean_hamming_distance = exp['mean hamming distance'] - exp_min = expected_mean_hamming_distance - exp['standard deviation'] - exp_max = expected_mean_hamming_distance + exp['standard deviation'] + expected_standard_deviation = exp['standard deviation'] * 1.75 + exp_min = expected_mean_hamming_distance - expected_standard_deviation + exp_max = expected_mean_hamming_distance + expected_standard_deviation assert exp_min <= res['mean hamming distance'] assert res['mean hamming distance'] <= exp_max