Skip to content

Commit

Permalink
Another attempt at test fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed May 31, 2021
1 parent 2d089ca commit ee23c3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_metadata_roundtrips_via_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def inception():
@pytest.mark.parametrize("pop", [{"N": 100, "L": 1}], indirect=["pop"])
def test_metadata_roundtrip_single_sim(rng, pdict, pop):
import sys

params = fwdpy11.ModelParams(**pdict)

r = fwdpy11.RandomAncientSamples(seed=42, samplesize=2, timepoints=[3])
Expand All @@ -64,12 +65,11 @@ def test_metadata_roundtrip_single_sim(rng, pdict, pop):

ts = pop.dump_tables_to_tskit()

# add neutral mutations w/no metadata
ts = msprime.mutate(ts, rate=1.0, random_seed=654321)

# bulk decode the mutation metadata, which is all None
if sys.version_info.minor > 6:
# FIXME: this is a hack to avoid the test failing with msprime < 1.0
# add neutral mutations w/no metadata
ts = msprime.mutate(ts, rate=1.0, random_seed=654321)
# bulk decode the mutation metadata, which is all None
mutation_md = fwdpy11.tskit_tools.decode_mutation_metadata(ts.tables)
assert all([i is None for i in mutation_md])

Expand Down

0 comments on commit ee23c3d

Please sign in to comment.