tests: scriptify function into module (#6619)

so that we can write tests having larger side-effects than
the run_copy that we use as a hack
This commit is contained in:
Saugat Pachhai
2021-09-15 22:01:10 +03:00
committed by GitHub
parent e049c4bab1
commit 198cdeec06
3 changed files with 52 additions and 8 deletions
+4
View File
@@ -5,6 +5,7 @@ import pytest
from .dir_helpers import * # noqa, pylint: disable=wildcard-import
from .remotes import * # noqa, pylint: disable=wildcard-import
from .utils.scriptify import scriptify
# Prevent updater and analytics from running their processes
os.environ["DVC_TEST"] = "true"
@@ -164,3 +165,6 @@ def custom_template(tmp_dir, dvc):
template = tmp_dir / "custom_template.json"
shutil.copy(tmp_dir / ".dvc" / "plots" / "default.json", template)
return template
scriptify_fixture = pytest.fixture(lambda: scriptify, name="scriptify")