mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
* Convert all paths in config to posix-style * Use PathInfo for consistancy, add unit test and change functional tests * Exclude Windows test on Linux * Don't patch Config for all the tests! * Don't do the linux test on Windows either * De-hackify the unit test, make the functional test more explicit * tests: adjust tests Co-authored-by: Charles Baynham <[email protected]> Co-authored-by: Ruslan Kuprieiev <[email protected]>
18 lines
422 B
Python
18 lines
422 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
|