Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaza committed Dec 8, 2024
1 parent 038967f commit 9a5fa36
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions tests/test_experiment_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def test_no_covariates(sample_data):
treatment_col=treatment_col,
experiment_identifier=experiment_identifier)


# This should not raise an error since all columns are present
try:
analyzer.get_effects()
analyzer.results
Expand All @@ -114,7 +112,30 @@ def test_no_adjustment(sample_data):
covariates=covariates
)

# This should not raise an error since all columns are present
try:
analyzer.get_effects()
analyzer.results
assert True
except Exception as e:
pytest.fail(f" raised an exception: {e}")


def test_ipw_adjustment(sample_data):
"""Test get_effects no adjustments"""
outcomes = "conversion"
treatment_col = "treatment"
experiment_identifier = "experiment"
covariates = "baseline_conversion"

analyzer = ExperimentAnalyzer(
data=sample_data,
outcomes=outcomes,
treatment_col=treatment_col,
experiment_identifier=experiment_identifier,
covariates=covariates,
adjustment="IPW"
)

try:
analyzer.get_effects()
analyzer.results
Expand Down

0 comments on commit 9a5fa36

Please sign in to comment.