mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
`dvc commit --help` was also completely broken, which is also fixed. This adds unit tests for completion generation for both zsh/bash, and tests that --help works for all commands.
18 lines
398 B
Python
18 lines
398 B
Python
import logging
|
|
|
|
import pytest
|
|
|
|
from dvc.cli import main
|
|
from dvc.commands.completion import SUPPORTED_SHELLS
|
|
|
|
|
|
@pytest.mark.parametrize("shell", SUPPORTED_SHELLS)
|
|
def test_completion(caplog, capsys, shell):
|
|
with caplog.at_level(logging.INFO):
|
|
assert main(["completion", "-s", shell]) == 0
|
|
assert not caplog.text
|
|
|
|
out, err = capsys.readouterr()
|
|
assert not err
|
|
assert out
|