Skip to content

Commit

Permalink
TST: disable pset hash test with numpy funtions (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
elcorto committed Jan 5, 2025
1 parent dea0401 commit ba3ca6b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba3ca6b

Please sign in to comment.