stage: implement add/create methods in stage loader (#5397)

* stage: add/create methods in stage loader

* minor fixups
This commit is contained in:
Saugat Pachhai
2021-02-08 18:30:10 +05:45
committed by GitHub
parent eeeaa9d324
commit 02a0d1af52
11 changed files with 161 additions and 107 deletions
-15
View File
@@ -138,18 +138,3 @@ def pytest_configure(config):
enabled_remotes.discard(remote_name)
if enabled:
enabled_remotes.add(remote_name)
@pytest.fixture
def dummy_stage(tmp_dir, dvc):
def make(path="dvc.yaml", name="dummy_stage", **kwargs):
from dvc.stage import PipelineStage, create_stage
cmd = kwargs.get("cmd", "command")
stage = create_stage(
PipelineStage, dvc, path, name=name, cmd=cmd, **kwargs
)
stage.dump()
return stage
return make