Repository navigation
checks: add actionable assertion messages to advanced OOP checks - #164
Conversation
Signed-off-by: mercael <mercael91@gmail.com>
Signed-off-by: mercael <mercael91@gmail.com>
Signed-off-by: mercael <mercael91@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Keep the original assertions and helper statements while adding messages. Avoid temporary bindings that overwrite learner variables in the shared namespace. Add a regression for the learner-owned area variable and the required file-location comments. Refs abhiksark#107.
abhiksark
left a comment
There was a problem hiding this comment.
Reviewed all eight messages against #107. The follow-up restores the original predicates and helper statements, preserves learner globals, and adds a regression that rejects the original area overwrite. All six reference/wrong-answer cases, branch tests (216), current-dev integration tests (243), fixture/build/installed-wheel checks, and all eight hosted CI jobs passed.
Summary
Add actionable messages to all eight bare assertions in
checks/oop_advanced/oop_advanced1.pythroughoop_advanced6.py, completing #107. Predicates, helper statements, execution order, and success output are preserved.The maintainer follow-up removes temporary
got,area,count, andtextbindings so checks do not replace learner variables in the shared namespace. A focused regression fails on the previousareaoverwrite and passes with the original predicate restored. Changed files include the required location comments.Closes #107.
Validation
Reviewed head:
2b954abd8ab4a62c13f00744cb5c631b1983007f. Local platform: Linux, Python 3.13.13.python -m pytest -q: 216 passed on the PR branch.devatf5a7779349d692938d1b5e53e5af0ef7e6fe9b0f;python -m pytest -q: 243 passed.python -m pythonlings --root tests/fixtures/passing_curriculum verify: passed.tests/unit/test_check_namespaces.py: failed on the original helper assignment (areachanged from 0 to 19), passed after the fix.PIP_CONFIG_FILE=/dev/null PIP_INDEX_URL=https://pypi.org/simple PIP_EXTRA_INDEX_URL= PIP_DEFAULT_TIMEOUT=15 PIP_RETRIES=0 python -m build --outdir /tmp/pythonlings-pr-loop.dfKE0X/pr-164-dist: source and wheel built./tmp/pythonlings-pr-loop.dfKE0X/wheel-venv/bin/python -m pip install --no-deps --force-reinstall /tmp/pythonlings-pr-loop.dfKE0X/pr-164-dist/pythonlings-0.4.4-py3-none-any.whl: installed into a temporary environment.git diff --check: passed.Hosted CI must pass at this head before squash merge into
dev.All eight hosted CI jobs passed at the reviewed head.