Skip to content

Commit

Permalink
100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jmafoster1 committed Nov 29, 2024
1 parent 0357c85 commit 499fc54
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/specification_tests/test_metamorphic_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ShouldCause,
ShouldNotCause,
generate_metamorphic_relations,
generate_metamorphic_relation,
)
from causal_testing.data_collection.data_collector import ExperimentalDataCollector
from causal_testing.specification.variable import Input, Output
Expand Down Expand Up @@ -317,6 +318,14 @@ def test_all_metamorphic_relations_implied_by_dag_ignore_cycles(self):
[],
)

def test_generate_metamorphic_relation_(self):
dag = CausalDAG(self.dag_dot_path)
[metamorphic_relation] = generate_metamorphic_relation(("X1", "Z"), dag)
self.assertEqual(
metamorphic_relation,
ShouldCause("X1", "Z", [], dag),
)

def test_equivalent_metamorphic_relations(self):
dag = CausalDAG(self.dag_dot_path)
sc_mr_a = ShouldCause("X", "Y", ["A", "B", "C"], dag)
Expand Down

0 comments on commit 499fc54

Please sign in to comment.