mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 15:28:26 +01:00
* 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]>
27 lines
622 B
Python
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)
|