Files
karaoke-gen/tests/unit
Andrew Beveridge ☄️andClaude Opus 5.5 39dcf2598e fix: PyPI prune snippet + force marker only in PR title (v0.268.10) (#1146)
## Summary
Two follow-ups to #1145, both found while doing today's prune.

1. **Prune console snippet silently did nothing.** PyPI's delete-version
form now requires five `acknowledge_*` checkboxes. A submit without them
gets a **200 re-render**, which the old snippet counted as "deleted".
The snippet now reads each release's real form (CSRF plus checkboxes),
submits it, and counts a version deleted only when its manage page 404s.
This is the exact approach used for today's prune (88 releases, 10.73 →
~4.1 GB).
2. **The force marker matched the commit body.** A squash commit's body
is the PR description. #1145's description just *mentioned* the marker,
which forced a publish on merge. That publish ran before the prune, so
it 400'd and uploaded nothing. The marker now only counts in the commit
subject (the PR title).

Docs: the runbook covers the new form, the per-version JSON cache lag,
and a prune log.

## Testing
- Unit tests: 30 pass across both scripts, with new tests for
checkbox/404 handling and for a marker in the body not forcing a publish
- `node --check` on the generated snippet
- Replayed #1145's real merge message through the gate: no publish
- Local CodeRabbit review: 0 findings
- Full `make test` not re-run (no app code touched); PR CI covers the
package suites

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01MSW9yjwGnzz1S8MgCGm6t5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:34:57 -04:00
..
2025-12-27 22:36:22 -05:00

Unit Tests for KaraokePrep

This directory contains unit tests for the KaraokePrep class.

Test Files

The tests are organized into the following files:

  • test_initialization.py: Tests for initialization and basic functionality
  • test_file_operations.py: Tests for file operations (copy, download, convert)
  • test_metadata.py: Tests for metadata extraction and parsing
  • test_lyrics.py: Tests for lyrics processing
  • test_audio.py: Tests for audio processing and separation
  • test_video.py: Tests for video creation and processing
  • test_async.py: Tests for async methods

Running the Tests

To run the tests, you need to have the test dependencies installed:

pip install -r requirements-test.txt

Then you can run the tests with:

python run_tests.py

This will run all the tests and generate a coverage report.

Checking Test Files

If you want to check if the test files are valid Python code without running the tests, you can use:

python check_tests.py

This will check if all the test files can be imported without errors.

Test Coverage

The tests aim to cover all the functionality of the KaraokePrep class. The coverage report will show you which parts of the code are covered by the tests.