Skip to content

Commit 77ac1b8

Browse files
committed
causal dag coverage
1 parent 67c973a commit 77ac1b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/specification_tests/test_causal_dag.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ def test_proper_backdoor_graph(self):
197197
)
198198
self.assertTrue(set(proper_backdoor_graph.edges).issubset(edges))
199199

200+
def test_proper_backdoor_graph_invalid_tratment(self):
201+
"""Test whether converting a Causal DAG to a proper back-door graph works correctly."""
202+
causal_dag = CausalDAG(self.dag_dot_path)
203+
with self.assertRaises(IndexError):
204+
causal_dag.get_proper_backdoor_graph(["INVALID"], ["Y"])
205+
200206
def test_constructive_backdoor_criterion_should_hold(self):
201207
"""Test whether the constructive criterion holds when it should."""
202208
causal_dag = CausalDAG(self.dag_dot_path)

0 commit comments

Comments
 (0)