Skip to content

Commit

Permalink
Throw prune_selected into the test matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Feb 2, 2021
1 parent b4171aa commit 00ab1ee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_ancient_samples_with_neutral_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,17 @@ def simplification_inteval(request):
return request.param


@pytest.fixture(params=[True, False])
def prune_selected(request):
return request.param


@pytest.mark.parametrize("rng", [{"seed": 101 * 45 * 110 * 210}], indirect=True)
@pytest.mark.parametrize(
"mslike_pop", [{"N": 50}, {"N": 100}, {"N": 200}], indirect=True
)
def test_ancient_samples_and_neutral_mutations(
pdict, simlen, simplification_inteval, rng, mslike_pop, resetter
pdict, simlen, simplification_inteval, prune_selected, rng, mslike_pop, resetter
):
"""
The test involving neutral mutations test GitHub issue 639 and 646
Expand All @@ -114,6 +119,7 @@ def test_ancient_samples_and_neutral_mutations(
seed=42, samplesize=10, timepoints=[i for i in range(1, simlen + 1)]
)
pdict["simlen"] = simlen
pdict["prune_selected"] = prune_selected
params = fwdpy11.ModelParams(**pdict)
fwdpy11.evolvets(
rng,
Expand Down Expand Up @@ -153,3 +159,5 @@ def test_ancient_samples_and_neutral_mutations(
assert mslike_pop.mcounts_ancient_samples[m.key] > 0
else:
assert len(s) == mslike_pop.mcounts[m.key]
if prune_selected is True and len(s) == 2 * mslike_pop.N:
assert mslike_pop.mcounts_ancient_samples[m.key] > 0

0 comments on commit 00ab1ee

Please sign in to comment.