From e651010b274ed2276f1d5da10391e14cd66edb1a Mon Sep 17 00:00:00 2001 From: Steve Schmerler Date: Sun, 5 Jan 2025 01:37:48 +0100 Subject: [PATCH] TST: disable pset hash test with numpy funcs (#33) --- tests/test_all.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/test_all.py b/tests/test_all.py index 2e94af5..bdbfe9a 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -19,7 +19,7 @@ import numpy as np import pytest import joblib -from packaging.version import parse as parse_version +##from packaging.version import parse as parse_version import psweep as ps @@ -613,13 +613,18 @@ def test_pset_hash(): assert ps.pset_hash(d1) == ps.pset_hash(dref) assert ps.pset_hash(d2) == ps.pset_hash(dref) - h_ref_np_v1 = "32522716b0514eb8b2677a917888c4ca21f792da" - h_ref_np_v2 = "6f5ceea02d337dac4914401d5cb53476eb68493c" - h_val = ps.pset_hash(dict(a=np.sin)) - if parse_version(np.__version__).major == 1: - assert h_val == h_ref_np_v1 - else: - assert h_val == h_ref_np_v2 + # Disable for now. See https://github.com/elcorto/psweep/issues/33 + # + ##h_ref_np_v1 = "32522716b0514eb8b2677a917888c4ca21f792da" + ### numpy 2.1.3 + ####h_ref_np_v2 = "6f5ceea02d337dac4914401d5cb53476eb68493c" + ### numpy 2.2.1 + ##h_ref_np_v2 = "3283cd92c60e58e22966f39fa7b1d002e30e2cde" + ##h_val = ps.pset_hash(dict(a=np.sin)) + ##if parse_version(np.__version__).major == 1: + ## assert h_val == h_ref_np_v1 + ##else: + ## assert h_val == h_ref_np_v2 # These are the correct hashes (tested: ipython or run this function in a # script). But pytest's deep introspection "magic" must do something to the