Skip to content

Add comprehensive XML parsing test coverage with fixtures#170

Merged
mustyoshi merged 2 commits into
masterfrom
claude/extend-xml-parsing-tests-WVwqR
Feb 18, 2026
Merged

Add comprehensive XML parsing test coverage with fixtures#170
mustyoshi merged 2 commits into
masterfrom
claude/extend-xml-parsing-tests-WVwqR

Conversation

@mustyoshi
Copy link
Copy Markdown
Collaborator

Add 104 new tests covering XML parsing functions that previously had 0%
test coverage. Tests cover:

  • convert_to_text(): quote handling, em-dash normalization, nested elements
  • filename_regex: all bill types (hr, s, hjres, sjres, hconres, sconres, hres, sres)
  • _nested_dict(): XML-to-dict conversion for bill status parsing
  • open_usc(): USC XML identifier lookup and document-order traversal
  • get_number(): USC identifier numeric ordering
  • unidecode_str(): Unicode normalization
  • translate_paragraph(): bill XML to USLM tag translation
  • Bill XML structure: title/date extraction, legis-body hierarchy, chapeau
  • USC XML structure: namespaces, section depth, organizational levels
  • Bill status XML: actions, committees, subjects, recorded votes
  • parse_such_code(): USC citation resolution

Includes 9 realistic XML fixture files in tests/fixtures/:

  • Bill XML (simple, amendments, nested quotes, empty body, date variants)
  • USC XML (title with chapters, subchapters, sections, subsections)
  • Bill status XML (actions, committees, policy areas, subjects)

https://claude.ai/code/session_012ZGX3Lu23YCpbwzrtgkpcT

Add 104 new tests covering XML parsing functions that previously had 0%
test coverage. Tests cover:

- convert_to_text(): quote handling, em-dash normalization, nested elements
- filename_regex: all bill types (hr, s, hjres, sjres, hconres, sconres, hres, sres)
- _nested_dict(): XML-to-dict conversion for bill status parsing
- open_usc(): USC XML identifier lookup and document-order traversal
- get_number(): USC identifier numeric ordering
- unidecode_str(): Unicode normalization
- translate_paragraph(): bill XML to USLM tag translation
- Bill XML structure: title/date extraction, legis-body hierarchy, chapeau
- USC XML structure: namespaces, section depth, organizational levels
- Bill status XML: actions, committees, subjects, recorded votes
- parse_such_code(): USC citation resolution

Includes 9 realistic XML fixture files in tests/fixtures/:
- Bill XML (simple, amendments, nested quotes, empty body, date variants)
- USC XML (title with chapters, subchapters, sections, subsections)
- Bill status XML (actions, committees, policy areas, subjects)

https://claude.ai/code/session_012ZGX3Lu23YCpbwzrtgkpcT
@mustyoshi mustyoshi merged commit b75b15e into master Feb 18, 2026
1 check passed
@mustyoshi mustyoshi deleted the claude/extend-xml-parsing-tests-WVwqR branch February 18, 2026 00:12
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.

2 participants