Skip to content

Commit d4af2f2

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 8b8f449 commit d4af2f2

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
@@ -656,6 +656,16 @@ def test_ancova(mock_pymc_sample, capsys):
656656
assert "n" in output
657657
assert "pre_mean" in output
658658
assert "post_mean" in output
659+
rounded_stats = result._group_level_summary_stats(round_to=1)
660+
assert isinstance(rounded_stats, pd.DataFrame)
661+
assert np.allclose(
662+
rounded_stats["pre_mean"],
663+
rounded_stats["pre_mean"].round(1),
664+
)
665+
assert np.allclose(
666+
rounded_stats["post_mean"],
667+
rounded_stats["post_mean"].round(1),
668+
)
659669
fig, ax = result.plot()
660670
assert isinstance(fig, plt.Figure)
661671
# For multi-panel plots, ax should be an array of axes

0 commit comments

Comments
 (0)