Skip to content

Commit ccc25fb

Browse files
Cover rounded ANCOVA summary stats in integration test.
Execute the `round_to` path in `PrePostNEGD._group_level_summary_stats()` so Codecov patch coverage includes the new group-level summary logic. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e15b144 commit ccc25fb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

causalpy/tests/test_integration_pymc_examples.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,16 @@ def test_ancova(mock_pymc_sample, capsys):
581581
assert "n" in output
582582
assert "pre_mean" in output
583583
assert "post_mean" in output
584+
rounded_stats = result._group_level_summary_stats(round_to=1)
585+
assert isinstance(rounded_stats, pd.DataFrame)
586+
assert np.allclose(
587+
rounded_stats["pre_mean"],
588+
rounded_stats["pre_mean"].round(1),
589+
)
590+
assert np.allclose(
591+
rounded_stats["post_mean"],
592+
rounded_stats["post_mean"].round(1),
593+
)
584594
fig, ax = result.plot()
585595
assert isinstance(fig, plt.Figure)
586596
# For multi-panel plots, ax should be an array of axes

0 commit comments

Comments
 (0)