Skip to content

test: add coverage for helpers/pack_transcripts.py - #142

Open
Ghost-outthere wants to merge 1 commit into
browser-use:mainfrom
Ghost-outthere:tests/pack-transcripts-coverage
Open

test: add coverage for helpers/pack_transcripts.py#142
Ghost-outthere wants to merge 1 commit into
browser-use:mainfrom
Ghost-outthere:tests/pack-transcripts-coverage

Conversation

@Ghost-outthere

@Ghost-outthere Ghost-outthere commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • helpers/pack_transcripts.py had no test coverage, unlike helpers/render.py which has tests/test_render_fps.py and tests/test_render_orientation.py.
  • Adds unit tests for its three pure functions: format_time, format_duration, and group_into_phrases (silence-based and speaker-change splitting, audio-event wrapping, punctuation spacing).
  • Follows the existing importlib-load pattern from tests/test_render_orientation.py so no packaging/install step is needed to run it.

Test plan

  • python -m unittest discover -s tests -v — all 28 tests pass (16 existing + 12 new) on a clean checkout.

Summary by cubic

Adds unit tests for helpers/pack_transcripts.py covering its three pure functions (time formatting, duration formatting, and phrase grouping) and verifies behavior like silence-based splitting, speaker changes, audio events, and punctuation spacing. The tests use the same importlib-load pattern as existing render tests, so no packaging step is needed; all 28 tests pass.

Written for commit 1013ddc. Summary will update on new commits.

Review in cubic

format_time, format_duration, and group_into_phrases had no tests,
unlike the render helpers. Follows the same importlib-load pattern
as tests/test_render_orientation.py.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@agilginayah-stack agilginayah-stack left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

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