File: test_options.py

package info (click to toggle)
python-dcos 0.2.0-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,440 kB
  • sloc: python: 8,196; sh: 194; makefile: 36
file content (21 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (4)
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')