Repository navigation
Let CodeTailor accept passing solutions on python3 questions - #1607
Merged
bnmnetp merged 1 commit intoOct 14, 2026
Merged
Conversation
CodeTailor only cleaned a question's test code when its language was exactly "python", so "python3" questions kept their own unittest.main() call. That call exits before JOBE prints PASS, so every generated solution read as failing and help fell back to the example solution. Clean for any Python language, and strip unittest.main(...) as well as myTests().main(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
What is causing the inconsistency in python vs python3? As I recall |
Contributor
Author
|
Yes you're correct. Xinying wrote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CodeTailor fell back to the example solution on Python questions whose language is
python3, even when the solution it generated was correct.Before CodeTailor uses a generated solution, it runs the question's tests on JOBE. It appends its own runner and looks for a final
PASSline.clean_python_testcaseremoves the question's own runner call so the two don't clash, butcoach.pyonly called it when the language was exactly"python". Questions markedpython3kept their ownunittest.main(), which runs the tests and exits beforePASSis printed. JOBE's output showedRan 1 test ... OKwith empty stdout, so every correct solution was counted as a failure.Changes
python.unittest.main(...)ormyTests().main(...)call, with or without arguments. Before, onlymyTests().main()was stripped.test/bases/rsptx/book_server_api/test_clean_python_testcase.py.Testing
unittest.main(): Get Help now returns a personalized solution instead ofexample_solution.🤖 Generated with Claude Code