Skip to content

test(audio): add edge cases for pad_audio single waveform, chunk boundaries, and base64 limit - #21

Open
nwalio wants to merge 1 commit into
fufuchiu:mainfrom
nwalio:test-audio-pad-and-chunk
Open

nwalio wants to merge 1 commit into
fufuchiu:mainfrom
nwalio:test-audio-pad-and-chunk

Conversation

@nwalio

@nwalio nwalio commented Sep 10, 2026

Copy link
Copy Markdown

Seven additional tests for audio.py covering paths the existing suite misses:

  • pad_audio with a single waveform (no padding needed)
  • pad_audio with identical-length waveforms (no zero-fill)
  • pad_audio with multiple > 1 rounds width up correctly
  • chunk_audio with chunk_size == len(samples) yields one chunk
  • chunk_audio with chunk_size > len(samples) yields one short chunk
  • pcm_encode / pcm_decode roundtrip at boundary values (-1, +1)
  • audio_from_base64 with a payload exactly at the byte limit

All 44 tests pass locally (pytest tests/test_audio.py -q).

@nwalio
nwalio requested a review from fufuchiu as a code owner September 10, 2026 04:37
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