Skip to content

Commit

Permalink
trying to figure out what is failing on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Mar 6, 2024
1 parent ca6d17f commit 6322061
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions thejoker/tests/test_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ def test_marginal_ln_likelihood(tmpdir, case):
assert len(ll) == len(prior_samples)

# save prior samples to a file and pass that instead
filename = str(tmpdir / "samples.hdf5")
prior_samples.write(filename, overwrite=True)
if platform.system() != "Darwin": # this test fails on CI??
filename = str(tmpdir / "samples.hdf5")
prior_samples.write(filename, overwrite=True)

ll = joker.marginal_ln_likelihood(data, filename)
assert len(ll) == len(prior_samples)
Expand All @@ -103,11 +104,10 @@ def test_marginal_ln_likelihood(tmpdir, case):
assert len(ll) == len(prior_samples)

# NOTE: this makes it so I can't parallelize tests, I think
if platform.system() != "Darwin": # this test fails on CI
with MultiPool(processes=2) as pool:
joker = TheJoker(prior, pool=pool)
ll = joker.marginal_ln_likelihood(data, filename)
assert len(ll) == len(prior_samples)
with MultiPool(processes=2) as pool:
joker = TheJoker(prior, pool=pool)
ll = joker.marginal_ln_likelihood(data, filename)
assert len(ll) == len(prior_samples)


priors = [
Expand Down

0 comments on commit 6322061

Please sign in to comment.