Meshroom/tests/conftest.py
2025-06-16 18:22:06 +02:00

18 lines
390 B
Python

import tempfile
import pytest
from meshroom.core.graph import Graph
@pytest.fixture
def graphSavedOnDisk():
"""
Yield a Graph instance saved in a unique temporary folder.
Can be used for testing graph IO and computation in isolation.
"""
with tempfile.TemporaryDirectory() as cacheDir:
graph = Graph()
graph.saveAsTemp(cacheDir)
yield graph