Files
dvc/tests/func/test_dependency.py
T
2019-05-21 15:04:43 -07:00

22 lines
515 B
Python

import copy
import pytest
from dvc.stage import Stage
from dvc.dependency import _get, DEP_MAP
from tests.func.test_output import TESTS as OUT_TESTS
TESTS = copy.copy(OUT_TESTS)
TESTS.append(("http://example.com/path/to/file", "http"))
TESTS.append(("https://example.com/path/to/file", "https"))
def _get_dep(dvc, path):
return _get(Stage(dvc), path, None)
@pytest.mark.parametrize("url,scheme", TESTS)
def test_scheme(dvc_repo, url, scheme):
assert type(_get_dep(dvc_repo, url)) == DEP_MAP[scheme]