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.
19 lines
423 B
Python
19 lines
423 B
Python
import os
|
|
|
|
import pytest
|
|
|
|
from dvc.config import Config
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"path, expected",
|
|
[
|
|
("cache", "../cache"),
|
|
(os.path.join("..", "cache"), "../../cache"),
|
|
(os.getcwd(), os.getcwd().replace("\\", "/")),
|
|
("ssh://some/path", "ssh://some/path"),
|
|
],
|
|
)
|
|
def test_to_relpath(path, expected):
|
|
assert Config._to_relpath(os.path.join(".", "config"), path) == expected
|