blob: 5854b1dd48197a53a3ff1aff1bd3b127f68ea5f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
"""Shared pytest fixtures."""
import pytest
import mml_composemusic_mcp.server as server_mod
@pytest.fixture
def tmp_output_dir(tmp_path, monkeypatch):
"""Provide an isolated output directory and patch server.OUTPUT_DIR."""
out = tmp_path / "data"
out.mkdir()
monkeypatch.setattr(server_mod, "OUTPUT_DIR", out)
return out
@pytest.fixture
def compose_mml(tmp_output_dir):
"""Return structured execution data with output dir patched."""
def execute(**kwargs):
return server_mod._execute_compose_mml(**kwargs).result
return execute
|