-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2586 from alicevision/fix/attributeValueChanged
Fix attribute value change propagation and callback handling
- Loading branch information
Showing
4 changed files
with
495 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from pathlib import Path | ||
import tempfile | ||
|
||
import pytest | ||
|
||
from meshroom.core.graph import Graph | ||
|
||
|
||
@pytest.fixture | ||
def graphWithIsolatedCache(): | ||
""" | ||
Yield a Graph instance using a unique temporary cache directory. | ||
Can be used for testing graph computation in isolation, without having to save the graph to disk. | ||
""" | ||
with tempfile.TemporaryDirectory() as cacheDir: | ||
graph = Graph("") | ||
graph.cacheDir = cacheDir | ||
yield 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.save(Path(cacheDir) / "test_graph.mg") | ||
yield graph |
Oops, something went wrong.