Skip to content

Commit

Permalink
Add a minor extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hyanwong committed Jul 24, 2023
1 parent 7400bc6 commit 83ffc1e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ def test_node_times(self):

def test_fails_unconstrained(self):
ts = utility_functions.two_tree_mutation_ts()
with pytest.raises(ValueError):
with pytest.raises(ValueError, match="must be tsdated"):
nodes_time_unconstrained(ts)


Expand All @@ -1852,9 +1852,14 @@ def test_no_sites(self):
with pytest.raises(ValueError):
tsdate.sites_time_from_ts(ts)

def test_undated(self):
ts = utility_functions.two_tree_mutation_ts()
with pytest.raises(ValueError, match="Try calling"):
tsdate.sites_time_from_ts(ts, unconstrained=True)

def test_node_selection_param(self):
ts = utility_functions.two_tree_mutation_ts()
with pytest.raises(ValueError):
with pytest.raises(ValueError, match="node_selection parameter"):
tsdate.sites_time_from_ts(ts, node_selection="sibling")

def test_sites_time_insideoutside(self):
Expand Down

0 comments on commit 83ffc1e

Please sign in to comment.