-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Improve parse_raw_prompt test cases for invalid input .v2 #30512
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
Improve parse_raw_prompt test cases for invalid input .v2 #30512
Conversation
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.
Code Review
This pull request adds a test case for parse_raw_prompts to handle invalid nested mixed-type inputs. While the intent to strengthen testing is good, the PR has two issues. First, the comment for the new test is contradictory to the test's implementation and should be corrected for clarity. Second, and more critically, the new test will fail against the current codebase due to an existing bug in parse_raw_prompts. Pull requests should not introduce failing tests. The test should either be accompanied by a fix for the function it tests or be marked as an expected failure (xfail).
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Kayvan Mivehnejad <[email protected]>
Signed-off-by: Kayvan Mivehnejad <[email protected]>
Signed-off-by: Kayvan Mivehnejad <[email protected]>
Signed-off-by: Kayvan Mivehnejad <[email protected]>
Signed-off-by: Kayvan Mivehnejad <[email protected]>
Head branch was pushed to by a user without write access
2efa5a9 to
fae6f0d
Compare
|
Hi ywang96, |
…ct#30512) Signed-off-by: Kayvan Mivehnejad <[email protected]> Signed-off-by: majiayu000 <[email protected]>
|
|
…ct#30512) Signed-off-by: Kayvan Mivehnejad <[email protected]>
…ct#30512) Signed-off-by: Kayvan Mivehnejad <[email protected]> Signed-off-by: Joachim Studnia <[email protected]>
…ct#30512) Signed-off-by: Kayvan Mivehnejad <[email protected]>
Purpose
This pull request adds a test case to strengthen the control flow of the
parse_raw_prmptstest case#4 for invalid input. The new test verifies that a nested mixed-type that passesprompt[0]check will raise a TypeError.Test Plan
pytest tests/test_input.py
pre-commit run --all-files
Test Result
The new case confirms that invalid nested inputs are rejected by
parse_raw_prompts.Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.