mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
* test: clean flake8 config root clutter * test: pre-commit: add isort Compatible with black (see https://github.com/timothycrosley/isort/issues/694) * lint: reorder imports * lint: more complex imports * lint: fix deepsource * config: isort: add first party dvc * tests: restyled: add isort * temp commit to revert before merge * Revert "temp commit to revert before merge" This reverts commit 11db0fd8e95fe891597cbb9bf804480909b19e24.
21 lines
504 B
Python
21 lines
504 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):
|
|
assert type(_get_dep(dvc, url)) == DEP_MAP[scheme]
|