We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71cc0c2 commit fa7e621Copy full SHA for fa7e621
tests/test_properties.py
@@ -10,6 +10,8 @@
10
11
pytest.importorskip("hypothesis")
12
13
+from itertools import starmap
14
+
15
import hypothesis.extra.numpy as npst
16
import hypothesis.strategies as st
17
from hypothesis import assume, given, settings
@@ -60,7 +62,7 @@ def deep_equal(a: Any, b: Any) -> bool:
60
62
if isinstance(a, np.ndarray) and isinstance(b, np.ndarray):
61
63
if a.shape != b.shape:
64
return False
- return all(deep_equal(x, y) for x, y in zip(a.flat, b.flat, strict=False))
65
+ return all(starmap(deep_equal, zip(a.flat, b.flat, strict=False)))
66
67
if isinstance(a, dict) and isinstance(b, dict):
68
if set(a.keys()) != set(b.keys()):
@@ -70,7 +72,7 @@ def deep_equal(a: Any, b: Any) -> bool:
70
72
if isinstance(a, (list, tuple)) and isinstance(b, (list, tuple)):
71
73
if len(a) != len(b):
74
- return all(deep_equal(x, y) for x, y in zip(a, b, strict=False))
75
+ return all(starmap(deep_equal, zip(a, b, strict=False)))
76
77
return a == b
78
0 commit comments