Skip to content

Missing testoutput#731

Merged
kennethshsu merged 1 commit into
mainfrom
#713-follow-up
Apr 30, 2026
Merged

Missing testoutput#731
kennethshsu merged 1 commit into
mainfrom
#713-follow-up

Conversation

@kennethshsu
Copy link
Copy Markdown
Collaborator

@kennethshsu kennethshsu commented Apr 30, 2026

What does this pull request do?

Addressed #713's missing test output

Relevent Github ticket(s)?

#713


Note

Low Risk
Low risk documentation-only change that adds expected doctest output for an existing example; no runtime logic is modified.

Overview
Adds the missing .. testoutput:: block to the Chainladder.fit docstring example so doctests/docs validation can assert the expected Chainladder() repr output.

Reviewed by Cursor Bugbot for commit 044e3a6. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 044e3a6. Configure here.

cl.Chainladder().fit(tr)

.. testoutput::

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing print() causes testoutput directive to fail

Medium Severity

The .. testcode:: block calls cl.Chainladder().fit(tr) without wrapping it in print(), but the new .. testoutput:: directive expects Chainladder() as output. Sphinx's testcode blocks only capture explicit stdout — unlike an interactive REPL, bare expressions don't produce output. Every other testcode/testoutput pair in this codebase (e.g. in triangle.py and benktander.py) uses print(). This test will fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 044e3a6. Configure here.

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

@genedan, would you mind moving all your branches under the main repo instead of working on your fork? That way I can write directly onto your branch.

Anyways, this PR addresses the one of the two recommendations by cursor in #713. The other recommendation is ok to ignore.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.25%. Comparing base (5e2bc69) to head (044e3a6).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #731   +/-   ##
=======================================
  Coverage   85.25%   85.25%           
=======================================
  Files          85       85           
  Lines        4952     4952           
  Branches      645      645           
=======================================
  Hits         4222     4222           
  Misses        521      521           
  Partials      209      209           
Flag Coverage Δ
unittests 85.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@genedan
Copy link
Copy Markdown
Collaborator

genedan commented Apr 30, 2026

Will do. I actually hadn't realized I had permissions to do that until recently. Then I saw you do it, and found out I could do it too!

@kennethshsu kennethshsu merged commit 68d38ef into main Apr 30, 2026
15 checks passed
@kennethshsu kennethshsu deleted the #713-follow-up branch April 30, 2026 21:31
@henrydingliu henrydingliu mentioned this pull request May 1, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants