fix: Cherry-pick string_utils improvements and add testing guidelines#865
Open
bjagg wants to merge 2 commits intoLIF-Initiative:mainfrom
Open
fix: Cherry-pick string_utils improvements and add testing guidelines#865bjagg wants to merge 2 commits intoLIF-Initiative:mainfrom
bjagg wants to merge 2 commits intoLIF-Initiative:mainfrom
Conversation
…ng_utils tests Cherry-picked from contractor PRs LIF-Initiative#813/LIF-Initiative#817 (now closed): - safe_identifier: collapse consecutive underscores produced by CamelCase boundary splitting combined with special characters - Replace placeholder test with 19 real tests covering all string_utils functions Co-Authored-By: Claude Opus 4.6 <[email protected]>
Capture testing philosophy: test non-trivial transformations, boundary conditions, and bug regressions. Don't test trivial wrappers, framework behavior, or for coverage's sake. Trim 5 trivial string_utils tests (19 -> 14) to match the stated principles. Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
schemaanddynamic_modelscomponents #813 and 328 graphql utilizing dynamic models #817 (both now closed — seedocs/proposals/contractor-pr-triage.mdfor full assessment)safe_identifier()to collapse consecutive underscores (e.g."some--thing"produces"some_thing"instead of"some__thing")string_utilstest with 14 focused tests covering non-trivial behaviorCLAUDE.mdandCONTRIBUTING.md— what to test, what not to testTesting principles added
Test plan
uv run pytest test/components/lif/string_utils/ -v— 14 tests passsafe_identifierfix doesn't break downstream consumers🤖 Generated with Claude Code