Skip to content

Commit b37cf09

Browse files
committed
Added a couple more tests
1 parent 936a459 commit b37cf09

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/main_tests/test_main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ def test_create_base_test_case_missing_treatment(self):
102102
)
103103
self.assertEqual("\"Treatment variable 'missing' not found in inputs or outputs\"", str(e.exception))
104104

105+
def test_create_base_test_case_missing_estimator(self):
106+
framework = CausalTestingFramework(self.paths)
107+
framework.setup()
108+
with self.assertRaises(ValueError) as e:
109+
framework.create_causal_test({}, None)
110+
self.assertEqual("Test configuration must specify an estimator", str(e.exception))
111+
112+
def test_create_base_test_case_invalid_estimator(self):
113+
framework = CausalTestingFramework(self.paths)
114+
framework.setup()
115+
with self.assertRaises(ValueError) as e:
116+
framework.create_causal_test({"estimator": "InvalidEstimator"}, None)
117+
self.assertEqual("Unknown estimator: InvalidEstimator", str(e.exception))
118+
105119
def test_create_base_test_case_missing_outcome(self):
106120
framework = CausalTestingFramework(self.paths)
107121
framework.setup()

0 commit comments

Comments
 (0)