mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
22 lines
548 B
Python
22 lines
548 B
Python
import copy
|
|
|
|
import pytest
|
|
|
|
from dvc.dependency import DEP_MAP, _get
|
|
from dvc.stage import Stage
|
|
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, url, scheme):
|
|
# pylint: disable=unidiomatic-typecheck
|
|
assert type(_get_dep(dvc, url)) == DEP_MAP[scheme]
|