Skip to content

Commit

Permalink
test(are_nodes_d_separated_cpdag): add one more edge case to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-sofia committed Jan 28, 2025
1 parent 8cb92e2 commit 76da8a9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,16 @@ def test_are_nodes_d_separated_cpdag_four_nodes_with_colliders(self):
self.assertFalse(graph.are_nodes_d_separated_cpdag(node1, node3, [node4]))
self.assertFalse(graph.are_nodes_d_separated_cpdag(node1, node3, [node2]))
self.assertTrue(graph.are_nodes_d_separated_cpdag(node1, node3, []))

def test_are_nodes_d_separated_cpdag_three_nodes_fully_connected_undirected_false(
self,
):
graph = GraphManager()
node1 = graph.add_node("test1", [1, 2, 3])
node2 = graph.add_node("test2", [1, 2, 3])
node3 = graph.add_node("test3", [1, 2, 3])
graph.add_edge(node1, node2, {"test": "test"})
graph.add_edge(node2, node3, {"test": "test"})
graph.add_edge(node1, node3, {"test": "test"})
self.assertFalse(graph.are_nodes_d_separated_cpdag(node1, node3, []))
self.assertFalse(graph.are_nodes_d_separated_cpdag(node1, node3, [node2]))

0 comments on commit 76da8a9

Please sign in to comment.