1
0
Fork 0
mirror of synced 2024-11-05 01:08:59 -05:00
yadm/test/test_help.py
2023-07-12 09:20:00 -05:00

19 lines
505 B
Python

"""Test help"""
import pytest
def test_missing_command(runner, yadm_cmd):
"""Run without any command"""
run = runner(command=yadm_cmd())
assert run.failure
assert run.err == ""
assert run.out.startswith("Usage: yadm")
@pytest.mark.parametrize("cmd", ["--help", "help"])
def test_help_command(runner, yadm_cmd, cmd):
"""Run with help command"""
run = runner(command=yadm_cmd(cmd))
assert run.failure
assert run.err == ""
assert run.out.startswith("Usage: yadm")