-
Notifications
You must be signed in to change notification settings - Fork 22
shorten error string, more enhancements needed #965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shorten error string, more enhancements needed #965
Conversation
|
Codeflash Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
| else "" | ||
| ) | ||
|
|
||
| if original_pytest_error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe change the var name? it's no longer the original pytest error if it's been shortened
| def shorten_pytest_error(pytest_error_string: str) -> str: | ||
| return "\n".join(re.findall(r"^[E>] +(.*)$", pytest_error_string, re.MULTILINE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codeflash will optimize this away or should've
…-test-results' into feat/shorten-test-feedback
cb8ce22
into
feat/feedback-loop-for-unmatched-test-results
TODOS
PR Type
Enhancement
Description
Add pytest error shortening utility
Integrate shortening into test comparison
Preserve non-LSP exit behavior unchanged
Diagram Walkthrough
File Walkthrough
code_utils.py
Add pytest error shortening utilitycodeflash/code_utils/code_utils.py
shorten_pytest_errorhelper.E>/>lines via multiline regex.exit_with_messagebehavior unchanged.equivalence.py
Integrate error shortening into comparison flowcodeflash/verification/equivalence.py
shorten_pytest_error.