test: add comprehensive test suite for schemas, tempo map, runner, and cli
This commit is contained in:
25
tests/test_cli.py
Normal file
25
tests/test_cli.py
Normal file
@ -0,0 +1,25 @@
|
||||
"""Unit tests for songsplit CLI."""
|
||||
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from songsplit.cli import app
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
|
||||
def test_cli_help():
|
||||
result = runner.invoke(app, ["--help"])
|
||||
assert result.exit_code == 0
|
||||
assert "Audio analysis pipeline decomposing songs into song packages" in result.stdout
|
||||
assert "doctor" in result.stdout
|
||||
assert "analyze" in result.stdout
|
||||
|
||||
|
||||
def test_cli_doctor():
|
||||
result = runner.invoke(app, ["doctor"])
|
||||
assert result.exit_code == 0
|
||||
# Rich table output is printed to stderr as configured in cli.py
|
||||
output = result.stdout + result.stderr
|
||||
assert "Python" in output
|
||||
assert "ffmpeg" in output
|
||||
assert "Model Cache" in output
|
||||
Reference in New Issue
Block a user