Skip to content

test(presets): normalize whitespace in resolve output assertion to prevent terminal line-wrap failures - #4166

Merged
mnriem merged 1 commit into
github:mainfrom
aoright:fix/test-presets-line-wrap-assertion
Aug 17, 2026
Merged

test(presets): normalize whitespace in resolve output assertion to prevent terminal line-wrap failures#4166
mnriem merged 1 commit into
github:mainfrom
aoright:fix/test-presets-line-wrap-assertion

Conversation

@aoright

@aoright aoright commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • In tests/test_presets.py::TestInstalledPresetRichMarkup::test_resolve_accepts_dotted_command_name, the assertion assert "constitution.md" in strip_ansi(result.output) failed when running in environments with constrained terminal column widths or long paths because Rich console output wrapped templates/commands/constituti\non.md across lines.
  • Normalize whitespace in the stripped output before asserting substring inclusion, ensuring test determinism regardless of path length or terminal width.

…event terminal line-wrap failures

Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
@aoright
aoright requested a review from mnriem as a code owner August 17, 2026 08:50
@mnriem
mnriem requested a balanced review from Copilot August 17, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Normalizes whitespace in preset resolver test output to prevent failures caused by Rich terminal wrapping.

Changes:

  • Removes output whitespace before checking for constitution.md.
Show a summary per file
File Description
tests/test_presets.py Makes the dotted-command assertion terminal-width independent.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@mnriem
mnriem merged commit 671c603 into github:main Aug 17, 2026
14 checks passed
@mnriem

mnriem commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants