Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new tests/cli/conftest.py fixture assigns to console.size, which is read-only in Rich and will raise AttributeError, breaking the CLI tests.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds end-to-end CLI tests under tests/cli/ to validate the prep and ppls Typer commands via in-process CliRunner invocations, asserting exact (snapshot-style) output.
Changes:
- Added snapshot-style stdout tests for multiple
preptarget formats (show,sft,verl,eval,cls) and aclipfallback failure case. - Added snapshot-style tests for
ppls(--list-formatand table output). - Introduced shared CLI test fixtures to isolate environment variables and normalize Rich rendering.
File summaries
| File | Description |
|---|---|
| tests/cli/conftest.py | Adds shared fixtures for CLI invocation and stdout snapshot assertions; attempts to normalize Rich output width. |
| tests/cli/test_clip.py | Adds CLI test for prep clip fallback behavior and expected failure. |
| tests/cli/test_cls.py | Adds slow CLI test for prep cls on CIFAR-10 with expected stdout snapshot. |
| tests/cli/test_eval.py | Adds CLI test for prep eval with expected stdout snapshot. |
| tests/cli/test_ppls.py | Adds CLI tests for ppls --list-format and ppls table output snapshots. |
| tests/cli/test_sft.py | Adds CLI test for prep sft with expected stdout snapshot. |
| tests/cli/test_show.py | Adds CLI test for prep show with expected stdout snapshot. |
| tests/cli/test_verl.py | Adds CLI test for prep verl with expected stdout snapshot and custom --q-template. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if isinstance(handler, RichHandler): | ||
| console = handler.console | ||
| prev_size = (console._width, console._height) | ||
| console.size = (120, 25) |
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.
Before submitting
Changes