Skip to content

Commit

Permalink
attempt making vr image test usable without a data dir setup
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Sep 11, 2022
1 parent 3eb1748 commit 2a2fd8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions yt/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,13 @@ def requires_file(req_file):
return skipif(condition, reason=f"Missing required file {req_file}")


def requires_file_v2(req_file):
condition = not os.path.exists(
os.path.join(ytcfg.get("yt", "test_data_dir"), req_file)
)
return skipif(condition, reason=f"Missing required file {req_file}")


def disable_dataset_cache(func):
@wraps(func)
def newfunc(*args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from yt.testing import (
fake_hexahedral_ds,
fake_tetrahedral_ds,
requires_file,
requires_file_v2 as requires_file,
requires_module,
)
from yt.utilities.answer_testing.framework import data_dir_load, data_dir_load_v2
Expand Down

0 comments on commit 2a2fd8f

Please sign in to comment.