Skip to content

Add integration tests for process_html_file with flite#9

Merged
Tomotz merged 1 commit intomasterfrom
devin/1771098406-integration-test-process-html
Feb 14, 2026
Merged

Add integration tests for process_html_file with flite#9
Tomotz merged 1 commit intomasterfrom
devin/1771098406-integration-test-process-html

Conversation

@Tomotz
Copy link
Owner

@Tomotz Tomotz commented Feb 14, 2026

Add integration tests for process_html_file with flite

Summary

Adds 9 end-to-end integration tests for process_html_file that actually invoke the flite binary. Tests are intentionally loose to allow changes in output format/reductions without breaking:

  • No exceptions: basic HTML, empty paragraphs, HTML entities, stdout mode all run without error
  • IPA present: output contains IPA characters
  • Output resemblance: original English words appear in output (word overlap ratio > 50%)
  • Structure preserved: HTML tags, non-paragraph content, multiple paragraphs handled correctly

All tests are gated behind a @requires_flite skip marker — they are skipped automatically if the flite binary isn't built.

Review & Testing Checklist for Human

  • CI will silently skip all 9 new tests because the workflow doesn't checkout submodules or build flite. I couldn't push workflow changes (OAuth scope limitation). To make these tests run in CI, manually update .github/workflows/tests.yml to add submodules: true to the checkout step and a cd flite && ./configure && make -j$(nproc) build step.
  • test_multiple_paragraphs asserts >= 6 <p> tags for 3 input paragraphs (assumes each paragraph produces an IPA + original pair). Verify this matches the intended process_html_file contract and is loose enough for future format changes.
  • Run git submodule update --init && cd flite && ./configure && make -j$(nproc) then python -m pytest test_main.py::TestProcessHtmlFileIntegration -v locally to confirm all 9 tests pass on your machine.

Notes

Co-Authored-By: tom mottes <tom.mottes@gmail.com>
@Tomotz Tomotz merged commit d7a625c into master Feb 14, 2026
1 check passed
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.

1 participant