Skip to content

Commit

Permalink
fixup! add tmp_path_fixture that uses /var/tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Sep 11, 2024
1 parent a5c0594 commit b3923d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/run/test_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,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 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"))
Expand Down

0 comments on commit b3923d8

Please sign in to comment.