Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for infinite time parents #101

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading