Skip to content

curriculum: add actionable assertion messages to testing checks - #160

Open
mercael91 wants to merge 3 commits into
abhiksark:devfrom
mercael91:fix/issue-95-v2
Open

mercael91 wants to merge 3 commits into
abhiksark:devfrom
mercael91:fix/issue-95-v2

Conversation

@mercael91

@mercael91 mercael91 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #95

What changed

Both files listed in the issue now report actionable messages on the 5 bare
assertions, and nothing else in the curriculum is touched:

  • checks/testing/testing8.py — the three spot-check assertions name the
    expected celsius value and the returned one.
  • checks/testing/testing10.py — the empty-list and negative-list assertions
    name the expected sum and the returned one.

Style

CONTRIBUTING.md asks for the actual value "where it is cheap, but never
re-call the learner's function inside the message". Each call is bound once
(celsius_32 = fahrenheit_to_celsius(32)) and the message reads that binding,
so the learner's function runs exactly as often as before. Every added line
stays inside the 80-column limit (the one 85-char line in testing10.py:5 is
unchanged from dev).

Assertion predicates, ordering, side effects and the success prints are
unchanged (testing8 ok / testing10 ok).

Verification

  • AST probe from the issue: 0 bare assertions in both files (was 3 + 2).
  • python -m pytest tests/integration/test_solution_verify.py -q passes: all
    reference answers verify against both checks.
  • With a deliberately wrong answer the new messages fire and name the value,
    e.g. sum_list([]) should be 0, got 42 and
    fahrenheit_to_celsius(32) should be 0.0, got 999.0.
  • No new line over 80 columns; the code stays Python 3.9 compatible.
  • CI: all 8 matrix jobs green.

Signed-off-by: mercael <mercael91@gmail.com>
Signed-off-by: mercael <mercael91@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce75f52d-4529-47ee-bc94-28417963e3cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Both files reported the actual value by calling the learner function again
inside the message. CONTRIBUTING.md asks for the actual value where it is
cheap but never a re-call, so the call is bound once and the message reads
that binding instead. The three long lines are also wrapped to stay inside
the 80-column limit.

This branch has not been deployed

No deployments
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.

1 participant