MCPcopy Create free account
hub / github.com/numpy/numpy / test_correct_hash_dict

Method test_correct_hash_dict

numpy/core/tests/test_regression.py:2333–2344  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2331 assert type(a[0]) is int
2332
2333 def test_correct_hash_dict(self):
2334 # gh-8887 - __hash__ would be None despite tp_hash being set
2335 all_types = set(np.sctypeDict.values()) - {np.void}
2336 for t in all_types:
2337 val = t()
2338
2339 try:
2340 hash(val)
2341 except TypeError as e:
2342 assert_equal(t.__hash__, None)
2343 else:
2344 assert_(t.__hash__ != None)
2345
2346 def test_scalar_copy(self):
2347 scalar_types = set(np.sctypeDict.values())

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
assert_Function · 0.90
tFunction · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected