Repository navigation
test: make script help assertion resilient to wrapping - #5347
Merged
Merged
Conversation
Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active issues were identified, and the changes are narrowly focused on making script-help regression tests reliable across terminal widths without changing CLI behavior.
No open issues 🎉
What changed in this PR
Updates the script-help regression tests to remain reliable when Rich wraps output at different terminal widths, without changing CLI behavior.
Changes:
- Parameterizes help checks for terminal widths of 60, 80, and 120 columns.
- Normalizes Rich table separators before matching wrapped help text.
- Covers
init,integration install,integration switch, andintegration upgrade.
| File | Description |
|---|---|
tests/specify_cli/integrations/test_registration.py |
Expands script-help coverage across terminal widths and normalizes Rich table output before assertions. |
This pull request is ready to be approved.
Review effort: Lite (auto)
kevinnguyenhoang91
pushed a commit
to kevinnguyenhoang91/spec-kit
that referenced
this pull request
Nov 10, 2026
Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
4 of 5 tasks
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.
Description
Make the script-help assertion independent of Rich table borders when help text wraps across lines. Cover terminal widths of 60, 80, and 120 columns for
initand integrationinstall,switch, andupgrade. CLI behavior is unchanged.Testing
Set up this checkout's
.venvand editable install using the local development guide. Run commands from the checkout root..venv/bin/specify --help(Windows PowerShell:.\.venv\Scripts\specify.exe --help).venv/bin/python -m pytest tests -q(Windows PowerShell:.\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks andLC_ALL=en_US.UTF-8on macOSCommands and results:
.venv/bin/specify --help- passed..venv/bin/python -m pytest tests/specify_cli/integrations/test_registration.py -q- 21 passed.GITHUB_ACTIONS=true .venv/bin/python -m pytest tests/specify_cli/integrations/test_registration.py -q- 21 passed.The full suite and Windows runner were not run locally. A sample project is not applicable to this test-only change.
AI Disclosure
AI disclosure: GitHub Copilot using GPT-6.1 Sol (model ID: gpt-6.1-sol), autonomous agent mode with runtime-default reasoning settings, assessed the CI failure, authored the test changes and this PR description, ran the focused checks, and committed and pushed the fix on behalf of @mnriem.