1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
from dcos import options
def test_extend_usage_docopt():
command_summaries = [
('first', 'first summary'),
('second', ' second summary '),
('third', 'third summary\n')
]
expected = """
\tfirst \tfirst summary
\tsecond \tsecond summary
\tthird \tthird summary"""
assert options.make_command_summary_string(command_summaries) == expected
def test_make_generic_usage_message():
assert (options.make_generic_usage_message('some generic message') ==
'Unknown option\nsome generic message')
|