Files
dvc/tests/unit/test_dvcfile.py
T
Saugat PachhaiandRuslan Kuprieiev 1937527249 dvc: implement multistage dvcfile (#3676)
* dvc: use lockfile as yaml instead of json

* refactor Dvcfile into Pipeline file and Single stage file

* fix tests

* dvc: fix outputs

* add more tests for collection of outputs

* add tests for data cloud/get/import/ls

* tests: test for checkouts

* Allow other checksums other than md5

* tests: use iterdir instead of os.listdir

* cleanup errors reported by cc and ds

* utils: throw DvcException instead of plain Exception

* tests: use yaml.load instead of json.load

* run: split assignments

* Update dvc/stage/exceptions.py

Co-authored-by: Ruslan Kuprieiev <[email protected]>
2020-04-28 13:36:05 +03:00

27 lines
622 B
Python

import pytest
from dvc.dvcfile import Dvcfile, PipelineFile, SingleStageFile
@pytest.mark.parametrize(
"path",
[
"pipelines.yaml",
"pipelines.yml",
"custom-pipelines.yml",
"custom-pipelines.yaml",
"../models/pipelines.yml",
],
)
def test_pipelines_file(path):
file_obj = Dvcfile(object(), path)
assert isinstance(file_obj, PipelineFile)
@pytest.mark.parametrize(
"path", ["Dvcfile", "stage.dvc", "../models/stage.dvc"]
)
def test_pipelines_single_stage_file(path):
file_obj = Dvcfile(object(), path)
assert isinstance(file_obj, SingleStageFile)