1
0
Fork 0
mirror of synced 2024-05-26 20:11:11 -04:00
yadm/test/test_help.py
Tim Byrne e7f9616b39
Rewrite testing system (#119)
The new test system is written with py.test. These tests are more
comprehensive, run faster by an order of magnitude, and are far more
maintainable. The tests themselves conform to PEP8.
2019-02-20 07:48:25 -06:00

18 lines
429 B
Python

"""Test help"""
def test_missing_command(runner, yadm_y):
"""Run without any command"""
run = runner(command=yadm_y())
assert run.failure
assert run.err == ''
assert run.out.startswith('Usage: yadm')
def test_help_command(runner, yadm_y):
"""Run with help command"""
run = runner(command=yadm_y('help'))
assert run.failure
assert run.err == ''
assert run.out.startswith('Usage: yadm')