Repository navigation
curriculum: add actionable assertion messages to functional7-9 checks - #165
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
|
…ctional9 checks Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks Signed-off-by: mercael <mercael91@gmail.com>
…ctional9 checks Signed-off-by: mercael <mercael91@gmail.com>
Add the required repository-relative path comments without changing execution behavior. Refs abhiksark#87.
abhiksark
left a comment
There was a problem hiding this comment.
All eight required messages are present across functional7-9. Predicates, helper statements, execution order, and success output are unchanged; no learner function is re-called by the new messages. Branch tests (219), current-dev integration tests (242), fixture verification, build/installed-wheel smoke, and all eight hosted CI jobs passed.
Closes #87.
Adds beginner-facing messages to all 8 bare assertions named in the issue:
checks/functional/functional7.py: 2checks/functional/functional8.py: 2checks/functional/functional9.py: 4Messages state the expected value (e.g.
product of [2, 3, 4] should be 24,all(x > 0 for x in [1, -2, 3]) should be False: -2 is not > 0) and neverre-call the learner's function, per
CONTRIBUTING.md. Every assertionpredicate, side effect and success print is unchanged.
tests/test_functional_assertion_messages.pyguards both rules for this batch:no bare assert in the three files, and no line over 80 columns.
Local validation at
f0312057f89a520e90171a8c0a1ab55ac8d88930(Linux, Python 3.13.13):python -m pytest -q: 219 passed on the PR branch.devate53b4c0454a07c712be54b4529b2de94bcaf025f;python -m pytest -q: 242 passed.python -m pythonlings --root tests/fixtures/passing_curriculum verify: passed.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-165-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-165-dist/pythonlings-0.4.4-py3-none-any.whl: passed in a temporary environment.git diff --check: passed.The maintainer follow-up only adds the required repository-relative file comments. Hosted CI must pass at this head before squash merge into
dev.All eight hosted CI jobs passed at the reviewed head. The stale Python 3.12 status was retried and is now completed successfully.