diff --git a/test/run/test_stages.py b/test/run/test_stages.py index ed1063ee1..5b7f4412d 100644 --- a/test/run/test_stages.py +++ b/test/run/test_stages.py @@ -6,6 +6,7 @@ import glob import json import os +import pathlib import pprint import random import re @@ -190,6 +191,14 @@ def path_equal_or_is_descendant(path, potential_ancestor): raise_assertion(f"after values are different: {difference1_values[1]}, {difference2_values[1]}") +# T0DO: find a nicer way +# overriding the build-in "tmp_path" so that we get the dir under /var/tmpx +@pytest.fixture(name="tmp_path") +def tmp_path_fixture(): + with tempfile.TemporaryDirectory(dir="/var/tmp") as tmp: + yield pathlib.Path(tmp) + + @pytest.mark.parametrize("test_dir", [ os.path.dirname(p) for p in glob.glob(os.path.join(test.TestBase.locate_test_data(), "stages/*/diff*.json"))