Skip to content

Commit f82d7d3

Browse files
committed
Adding a test ton ensure an exception is raised when len(time_range) != 2
1 parent d7a0157 commit f82d7d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

causalpy/tests/test_integration_pymc_examples.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ def test_cp_covid():
441441
df,
442442
time_range=[0, 0, 0],
443443
formula="standardize(deaths) ~ 0 + t + C(month) + standardize(temp)", # noqa E501
444-
model=cp.pymc_models.LinearRegression(sample_kwargs=sample_kwargs),
444+
model=cp.pymc_models.LinearChangePointDetection(
445+
cp_effect_type=["impulse", "level", "trend"],
446+
sample_kwargs=sample_kwargs,
447+
),
445448
)
446449
assert "Provided time_range must be of length 2 : (start, end)" in str(
447450
exc_info.value

0 commit comments

Comments
 (0)