Skip to content

Commit bd0a1a5

Browse files
committed
msprime produces different trees on macos (same seed)
1 parent e08abf4 commit bd0a1a5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

python/tests/test_python_c.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,12 @@ def norm_func(X, n, nA, nB):
20502050
a = ts_multi.two_locus_count_stat(
20512051
ss_sizes, ss, stat_func, norm_func, 1, True, None, None, None, None, "site"
20522052
)
2053-
assert a.shape == (56, 56, 1) # ts has 56 sites
2053+
import platform
2054+
2055+
if platform.system() == "Darwin":
2056+
assert a.shape == (54, 54, 1) # ts has 54 sites on macos?
2057+
else:
2058+
assert a.shape == (56, 56, 1) # ts has 56 sites
20542059
a = ts_multi.two_locus_count_stat(
20552060
ss_sizes, ss, stat_func, norm_func, 1, True, None, None, None, None, "branch"
20562061
)
@@ -2159,10 +2164,10 @@ def norm_func(X, n, nA, nB):
21592164
for exception in [ValueError, TypeError]:
21602165

21612166
def stat_func_except(*_):
2162-
raise exception("test")
2167+
raise exception("test") # noqa: B023
21632168

21642169
def norm_func_except(*_):
2165-
raise exception("test")
2170+
raise exception("test") # noqa: B023
21662171

21672172
with pytest.raises(exception, match="test"):
21682173
method(

0 commit comments

Comments
 (0)