darkmedia-x-api / docs /testing_strategy.md
cybermedia's picture
Upload folder using huggingface_hub
343eed9 verified

A newer version of the Gradio SDK is available: 6.15.0

Upgrade

Testing Strategy

Unit Tests

  • Located in tests/ directory.
  • Use FastAPI TestClient (built on requests) and pytest.
  • Coverage includes:
    • System stats (/api/system).
    • Engine flag persistence (/api/engine/control).
    • TTS preview with and without narration.
    • Story launch flow.

Running Tests

pip install -r requirements.txt   # includes pytest
pytest -v

CI Integration

  • GitHub Actions workflow (.github/workflows/ci.yml) runs pytest --cov=. on every PR.
  • Fails the build if coverage drops below 80 %.