Voice / tests /README.md
Wiself's picture
Upload 341 files
9f5fbb5
|
Raw History Blame Contribute Delete
951 Bytes

voice tests

Stdlib unittest only. No pytest, no extra deps beyond what voice.py needs (gguf, numpy). Run from the repo root, next to voice.py.

# offline: pure logic + fake-server download engine (always safe, <2 min)
python3 -m unittest discover -s tests

# live: real Hugging Face fetches (~1.6 GB first run, cached after) plus
# a full end-to-end cast and CPU inference run
VOICE_TEST_LIVE=1 python3 -m unittest discover -s tests

Live knobs (all optional):

  • VOICE_TEST_CACHE — model download cache (default ~/.cache/voice-tests).
  • LLAMA_CLI — inference binary (default: llama-cli on PATH).
  • No HF_TOKEN needed: every live fixture is a public repo.

Layout: test_units.py (pure logic) · test_download.py (fake-server engine) · test_live.py (cheap real reads) · test_voices.py (real head fetches + delta) · test_e2e.py (cast + llama-cli inference). Shared fixtures live in _helpers.py.