35 lines
918 B
Python
35 lines
918 B
Python
import json
|
|
import pytest
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption("--run-smoke", action="store_true", default=False,
|
|
help="Run real-mmx smoke tests (consumes quota)")
|
|
|
|
|
|
@pytest.fixture
|
|
def tmp_voices_json(tmp_path):
|
|
"""Return a path to a non-existent voices.json inside tmp_path."""
|
|
return tmp_path / "voices.json"
|
|
|
|
|
|
@pytest.fixture
|
|
def populated_voices_json(tmp_path):
|
|
"""Return a path to a voices.json pre-populated with one entry."""
|
|
p = tmp_path / "voices.json"
|
|
p.write_text(
|
|
json.dumps(
|
|
{
|
|
"voices": {
|
|
"wantsong": {
|
|
"file_id": 396061597295017,
|
|
"filename": "Wantsong人物录音.mp3",
|
|
"created_at": "2026-06-08T12:00:00Z",
|
|
}
|
|
}
|
|
}
|
|
),
|
|
encoding="utf-8",
|
|
)
|
|
return p
|