Files
Saugat Pachhai (सौगात) f5baf990cf cli: refactor into a module
By splitting dvc.cli into a module, we'll be able to share cli-related
utilities, split parser-related stuffs into smaller parts, improve
reusability and improve API for command extensions in the future.
2022-01-19 12:22:07 +02:00

14 lines
340 B
Python

from dvc.cli import main
def test_root(tmp_dir, dvc, capsys):
assert main(["root"]) == 0
assert "." in capsys.readouterr()[0]
def test_root_locked(tmp_dir, dvc, capsys):
# NOTE: check that `dvc root` is not blocked with dvc lock
with dvc.lock:
assert main(["root"]) == 0
assert "." in capsys.readouterr()[0]