Files
dvc/tests/func/test_version.py
T
Arun MahapatraandRuslan Kuprieiev 6324bd8a69 dvc: include cache urls in info output. (#4848)
* dvc: include cache urls in info output.

Show cache urls for external and remote cache in the info output
to assist in diagnosis of issues.

Fixes #4574.

* Remove unnecessary constant check for generator expression.

* Add remotes and caches in version command for better diagnosis.

* Fix flaky unit test to be runtime independent by using regex search.

* Use Cache.by_scheme() for enumerating supported caches.

* Add get_cloud_schemes routine for retrieval of configured remote schemes.

Add tests for local remote and remote:// scheme for info.

* Cleanup unused code.

* info: refactor remote parsing

Co-authored-by: Ruslan Kuprieiev <[email protected]>
2020-11-19 05:59:33 +02:00

17 lines
562 B
Python

import re
from dvc.main import main
from tests.unit.test_info import PYTHON_VERSION_REGEX
def test_(tmp_dir, dvc, scm, caplog):
assert main(["version"]) == 0
assert re.search(r"DVC version: \d+\.\d+\.\d+.*", caplog.text)
assert re.search(f"Platform: {PYTHON_VERSION_REGEX} on .*", caplog.text)
assert re.search(r"Supports: .*", caplog.text)
assert re.search(r"Cache types: .*", caplog.text)
assert re.search(r"Caches: local", caplog.text)
assert re.search(r"Remotes: None", caplog.text)
assert "Repo: dvc, git" in caplog.text