Skip to content

test: improve audio module test coverage to 80%+#10

Merged
Orinks merged 1 commit intodevfrom
test/audio-coverage
Feb 4, 2026
Merged

test: improve audio module test coverage to 80%+#10
Orinks merged 1 commit intodevfrom
test/audio-coverage

Conversation

@Orinks
Copy link
Owner

@Orinks Orinks commented Feb 3, 2026

Bring audio module coverage from 65% to 96%:

  • player.py: 66% → 94%
  • tts_engine.py: 63% → 97%
  • Total audio module: 65% → 96%

Tests added for:

  • BASS audio init/cleanup with sound_lib
  • Fallback playback via playsound3
  • Volume control during active playback
  • Stream lifecycle (create, stop, free)
  • pyttsx3 engine init, speech, and error handling
  • Voice enumeration and selection
  • Rate property with engine sync
  • Time formatting edge cases (midnight, noon, quarter-to)
  • Error handling and graceful degradation

All external audio dependencies (sound_lib, playsound3, pyttsx3) are fully mocked for CI.

Closes #8

Bring audio module coverage from 65% to 96%:
- player.py: 66% → 94%
- tts_engine.py: 63% → 97%

Added comprehensive tests for:
- BASS audio init/cleanup with sound_lib
- Fallback playback via playsound3
- Volume control during active playback
- Stream lifecycle (create, stop, free)
- pyttsx3 engine init, speech, and error handling
- Voice enumeration and selection
- Rate property with engine sync
- Time formatting edge cases (midnight, noon, quarter-to)
- Error handling and graceful degradation

All external audio dependencies (sound_lib, playsound3, pyttsx3) are mocked.

Closes #8
@Orinks Orinks merged commit 498c83a into dev Feb 4, 2026
5 checks passed
@Orinks Orinks deleted the test/audio-coverage branch February 4, 2026 02:03
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