drop the python3 one-liner from the surface-tool-error hook test #627

Closed
opened 2026-09-24 18:36:14 +00:00 by hexajon · 0 comments
Owner

What

hooks/tests/surface-tool-error.test.sh:158 builds a long error string with python3 -c "print('x' * 600)", and falls back to printf '%0.s x' {1..600}. The fallback is not the same string: it gives 600 copies of " x", 1200 characters. The test only needs text longer than 500 characters, so it passes either way, but the Python line is not needed.

Fix

Build the string in bash alone: long_text=$(printf 'x%.0s' {1..600}), which gives exactly 600 "x" characters.

Acceptance

  • The test has no python3 call and passes.
## What `hooks/tests/surface-tool-error.test.sh:158` builds a long error string with `python3 -c "print('x' * 600)"`, and falls back to `printf '%0.s x' {1..600}`. The fallback is not the same string: it gives 600 copies of " x", 1200 characters. The test only needs text longer than 500 characters, so it passes either way, but the Python line is not needed. ## Fix Build the string in bash alone: `long_text=$(printf 'x%.0s' {1..600})`, which gives exactly 600 "x" characters. ## Acceptance - The test has no `python3` call and passes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
sixfold-space/madtea#627
No description provided.