26 lines
701 B
Python
26 lines
701 B
Python
"""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
|