Skip to content

Commit

Permalink
Merge pull request #101 from hyanwong/inf-parent-time-test
Browse files Browse the repository at this point in the history
Add test for infinite time parents
  • Loading branch information
hyanwong authored Mar 7, 2024
2 parents d726e99 + e2ea26e commit a20aa6a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,17 @@ def test_bad_add_iedge_row(self):
0, 1, 0, 1, child=0, parent=1, validate_node_times=True
)

def test_parent_child_at_inf(self):
tables = gigl.Tables()
tables.nodes.add_row(time=np.inf)
tables.nodes.add_row(time=np.inf)
tables.nodes.add_row(time=0)
with pytest.raises(ValueError, match="not less than parent time"):
tables.add_iedge_row(
0, 1, 0, 1, child=0, parent=1, validate_node_times=True
)
tables.add_iedge_row(0, 1, 0, 1, child=2, parent=1, validate_node_times=True)

def test_child_iterator(self, all_sv_types_re_gig):
tables = all_sv_types_re_gig.tables
assert tables.iedges.flags == gigl.VALID_GIG
Expand Down

0 comments on commit a20aa6a

Please sign in to comment.