Repository navigation
test: pin that drawText renders one line and rejects a null character - #71
Merged
dmccoystephenson merged 1 commit intoNov 11, 2026
Merged
Conversation
A "\n" in drawText's text is not a line break, and a "\0" raises ValueError from pygame before anything is painted. Neither was documented or tested; both are now pinned and described in the drawText docstring and the README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (posted as a plain comment; no independent reviewer was configured —
Observations (judgment calls, not applied):
Verdict: ready to merge — test/doc-only, no do-not-auto-merge path touched, anchor green. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
dmccoystephenson
deleted the
test/pin-draw-text-single-line-and-null-character
branch
November 11, 2026 06:40
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.
Summary
Stage B (unit-test expansion) cycle on
drawText'stextargument. Two behaviors were found to be neither tested nor documented, and are now pinned as characterization tests and described in the docs:drawTextrenders its text as a single line; a"\n"is drawn inline (as a glyph) rather than starting a new line, so multi-line text needs one call per line.test_draw_text_does_not_break_lines_at_a_newlineasserts the ink of"A\nB"fits within one font line height."\0", and theValueErrorreaches the caller before anything is blitted.test_draw_text_with_a_null_character_raises_value_error_and_paints_nothingpins both halves.drawTextdocstring (textarg) and the README'sdrawTextbullet were updated to describe both.No production behavior was changed — only a docstring line in
graphik.py. The public API is untouched (no consumer-impact check needed).Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pypytest— 153 passed (151 before + 2 new), headless via the existing conftest dummy SDL driversFont.size("a\nb")has the single-line height of"ab";render("a\0b")raisesValueError: A null character was found in the text)Skipped issues
All open issues were deferred this cycle, each pending a maintainer decision:
.github/workflows/and/or the release process, which are excluded from autonomous change.preponderous.*package convention sibling projects follow) cannot be settled from inside this repository.No tracking issue — gap found during a test-coverage sweep.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson