mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-11-14 18:22:59 +01:00
Add a deterministic GitHub Actions CI workflow and address targeted review items around task state safety, custom audio validation, VideoAspect validation, and Redis state documentation.
1.3 KiB
1.3 KiB
MoneyPrinterTurbo Test Directory
This directory contains unit tests for the MoneyPrinterTurbo project.
Directory Structure
services/: Tests for components in theapp/servicesdirectorytest_video.py: Tests for the video servicetest_task.py: Tests for the task servicetest_voice.py: Tests for the voice service
Running Tests
You can run the tests using Python’s built-in unittest framework:
# Run all tests
python -m unittest discover -s test
# Run a specific test file
python -m unittest test/services/test_video.py
# Run a specific test class
python -m unittest test.services.test_video.TestVideoService
# Run a specific test method
python -m unittest test.services.test_video.TestVideoService.test_preprocess_video
Live provider tests are skipped by default. To run tests that may call external
TTS or LLM services, set MPT_RUN_INTEGRATION_TESTS=1 and provide the required
provider credentials.
Adding New Tests
To add tests for other components, follow these guidelines:
- Create test files prefixed with
test_in the appropriate subdirectory - Use
unittest.TestCaseas the base class for your test classes - Name test methods with the
test_prefix
Test Resources
Place any resource files required for testing in the test/resources directory.