Files
dvc/tests/func/test_version.py
T
Saugat PachhaiandRuslan Kuprieiev 8abda93e3e use setuptools_scm and build_requires (#6775)
* use setuptools_scm and build_requires

* remove kwargs from setup.py

* fix tests; fetch in depth in github actions

* use build to build sdist/wheel

* try updating pip and setuptools

* update pip

* remove or unpin wheel

* bring back the version in pyinstaller

* Update scripts/build.py

Co-authored-by: Ruslan Kuprieiev <[email protected]>
2021-10-12 17:58:14 +03:00

22 lines
600 B
Python

import re
from dvc.main import main
from tests.unit.test_info import (
DVC_VERSION_REGEX,
PYTHON_VERSION_REGEX,
find_supported_remotes,
)
def test_(tmp_dir, dvc, scm, capsys):
assert main(["version"]) == 0
out, _ = capsys.readouterr()
assert re.search(fr"DVC version: {DVC_VERSION_REGEX}", out)
assert re.search(f"Platform: {PYTHON_VERSION_REGEX} on .*", out)
assert find_supported_remotes(out)
assert re.search(r"Cache types: .*", out)
assert re.search(r"Caches: local", out)
assert re.search(r"Remotes: None", out)
assert "Repo: dvc, git" in out