Skip to content

Commit 499fc54

Browse files
committed
100% coverage
1 parent 0357c85 commit 499fc54

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/specification_tests/test_metamorphic_relations.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
ShouldCause,
1111
ShouldNotCause,
1212
generate_metamorphic_relations,
13+
generate_metamorphic_relation,
1314
)
1415
from causal_testing.data_collection.data_collector import ExperimentalDataCollector
1516
from causal_testing.specification.variable import Input, Output
@@ -317,6 +318,14 @@ def test_all_metamorphic_relations_implied_by_dag_ignore_cycles(self):
317318
[],
318319
)
319320

321+
def test_generate_metamorphic_relation_(self):
322+
dag = CausalDAG(self.dag_dot_path)
323+
[metamorphic_relation] = generate_metamorphic_relation(("X1", "Z"), dag)
324+
self.assertEqual(
325+
metamorphic_relation,
326+
ShouldCause("X1", "Z", [], dag),
327+
)
328+
320329
def test_equivalent_metamorphic_relations(self):
321330
dag = CausalDAG(self.dag_dot_path)
322331
sc_mr_a = ShouldCause("X", "Y", ["A", "B", "C"], dag)

0 commit comments

Comments
 (0)