diff options
Diffstat (limited to 'tests/test_compose_mml_tool.py')
| -rw-r--r-- | tests/test_compose_mml_tool.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/test_compose_mml_tool.py b/tests/test_compose_mml_tool.py index 3d56115..be4735e 100644 --- a/tests/test_compose_mml_tool.py +++ b/tests/test_compose_mml_tool.py @@ -65,7 +65,16 @@ def test_validate_pyxel(compose_mml): def test_template_all(compose_mml): for mode in ("ppmck", "pyxel"): - for template in ("basic", "melody", "chord", "drum", "empty"): + for template in ( + "basic", + "melody", + "chord", + "drum", + "empty", + "expressive_lead", + "vibrato_lead", + "pitch_motion", + ): result = compose_mml(action="template", mode=mode, template=template) assert "mml" in result assert "description" in result @@ -77,6 +86,18 @@ def test_template_all(compose_mml): ) +def test_synthesis_templates_compose(compose_mml, tmp_output_dir): + for mode in ("ppmck", "pyxel"): + for template in ("expressive_lead", "vibrato_lead", "pitch_motion"): + generated = compose_mml(action="template", mode=mode, template=template) + result = compose_mml(action="compose", mml=generated["mml"], mode=mode) + assert result["success"] is True, ( + f"{mode}/{template} synthesis failed: {result['validation']}" + ) + assert result["duration_sec"] > 0 + assert Path(result["wav_path"]).exists() + + def test_template_invalid_fallback(compose_mml): result = compose_mml(action="template", mode="pyxel", template="unknown") assert result["description"] == "基本的な4ch構成(メロディ+和音+ベース+リズム)" |
