2022-07-31 10:00:45 +00:00
|
|
|
from pytest_pyodide import run_in_pyodide
|
2022-05-17 19:31:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
@run_in_pyodide(
|
|
|
|
packages=[
|
|
|
|
"msprime",
|
|
|
|
]
|
|
|
|
)
|
2022-05-26 02:47:43 +00:00
|
|
|
def test_msprime(selenium):
|
2022-05-17 19:31:43 +00:00
|
|
|
import msprime
|
|
|
|
import tskit
|
|
|
|
|
|
|
|
# basic test
|
|
|
|
ts = msprime.sim_ancestry(10, random_seed=42)
|
|
|
|
ts.dump("/tmp/msprime.trees")
|
|
|
|
ts = tskit.load("/tmp/msprime.trees")
|
|
|
|
ts2 = msprime.sim_ancestry(10, random_seed=42)
|
|
|
|
ts.tables.assert_equals(ts2.tables, ignore_provenance=True)
|