Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 981 Bytes

File metadata and controls

40 lines (27 loc) · 981 Bytes

Testing

MoneyPrinter uses pytest for backend tests.

Install test dependencies

Install dev dependencies (includes pytest):

uv sync --group dev

Run tests

Run all tests:

uv run pytest

Run one test file:

uv run pytest tests/test_repository.py

Run one test:

uv run pytest tests/test_repository.py::test_create_job_persists_payload_and_queued_event

Current test scope

  • tests/test_api_jobs.py: API queue, job status/events, and cancellation endpoints.
  • tests/test_api_misc.py: API model listing fallback and song upload endpoint behavior.
  • tests/test_repository.py: queue/repository behavior for create, claim, cancel, and completion events.
  • tests/test_worker.py: worker loop behavior for success, cancellation, failure, and empty queue.
  • tests/test_utils.py: filesystem cleanup, song selection, and ImageMagick binary resolution.
  • tests/conftest.py: isolated SQLite session fixture per test.