Skip to content

Commit

Permalink
Import human into fwdpy11.demographic_models. (#835)
Browse files Browse the repository at this point in the history
Add import tests.

Closes #832
  • Loading branch information
molpopgen authored Oct 25, 2021
1 parent 9376c1c commit 67b6df0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions doc/misc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Documentation
`pr`{834}
`issue`{833}

Packaging

* Fix import of functions in `fwdpy11.demographic_models.human`.
`pr`{835}
`issue`{832}

## 0.16.1

New features:
Expand Down
1 change: 1 addition & 0 deletions fwdpy11/demographic_models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import human
from .demographic_model_details import (DemographicModelCitation, # NOQA
DemographicModelDetails)
9 changes: 7 additions & 2 deletions tests/test_demographic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import os
import unittest

import numpy as np

import fwdpy11
import numpy as np
import pytest


def setup_pdict(demog, simlen):
Expand Down Expand Up @@ -138,6 +138,11 @@ def test_init_migrates_numpy(self):
self.assertEqual(model, model)


@pytest.mark.parametrize("modelname", ["tennessen", "jouganous_three_deme"])
def test_import_human_demographic_models(modelname):
_ = eval("fwdpy11.demographic_models.human." + modelname + "()")


@unittest.skipIf(
"RUN_EXPENSIVE_TESTS" not in os.environ or os.environ["RUN_EXPENSIVE_TESTS"] != "1",
"Expensive test.",
Expand Down

0 comments on commit 67b6df0

Please sign in to comment.