summaryrefslogtreecommitdiff
path: root/test/test_help.py
blob: 0d8f2c3c2c46af09ffebf2d2b6962c6ea27e0621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""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')