1
0
Fork 0
mirror of synced 2024-12-22 06:31:07 -05:00
yadm/test/test_help.py

21 lines
506 B
Python
Raw Normal View History

"""Test help"""
import pytest
def test_missing_command(runner, yadm_cmd):
"""Run without any command"""
run = runner(command=yadm_cmd())
assert run.failure
2023-07-10 15:43:17 -04:00
assert run.err == ""
assert run.out.startswith("Usage: yadm")
2023-07-10 15:43:17 -04:00
@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
2023-07-10 15:43:17 -04:00
assert run.err == ""
assert run.out.startswith("Usage: yadm")