test: expand patch_builder test coverage (7 → 52 tests)#699
Merged
Conversation
Add comprehensive unit tests for the most complex module (470 lines): - build_patches() 6 branching paths: sidecar match + child resolve, child fail + list split, child fail + containing block, sidecar miss + text search, sidecar miss + table split, text mismatch + remapping - _resolve_child_mapping() 4-tier fallback (8 tests) - Helper functions: is_markdown_table, split_table_rows, normalize_table_row, split_list_items, extract_list_marker_prefix - build_table_row_patches, build_list_item_patches integration - Edge cases: NON_CONTENT_TYPES skip, multiple changes grouped Test count: 251 → 296 (all passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
patch_builder.py(470줄, 가장 복잡한 모듈) 전용 테스트를 7개 → 52개로 확충build_patches()6가지 분기 경로별 테스트 (10개)_resolve_child_mapping()4단계 fallback 테스트 (8개)is_markdown_table,split_table_rows,normalize_table_row,split_list_items,extract_list_marker_prefixbuild_table_row_patches,build_list_item_patches통합 테스트 (6개)Context
[코드 품질 진단] P1-#3 항목:
patch_builder.py의 테스트 비율이 0.14x (470줄 대비 66줄)로 심각하게 부족했던 문제 해결. Phase 2 구현 시 리그레션 감지 안전망으로 활용.Test plan
🤖 Generated with Claude Code