Exemple #1
0
def test_args_url_and_text():
    with pytest.raises(DocoptExit):
        docopt(to_string(main_doc),
               'lsa --url=URL --text=TEXT'.split(),
               version=__version__)
Exemple #2
0
def test_args_url_and_file():
    with pytest.raises(DocoptExit):
        docopt(to_string(main_doc),
               'lsa --url=URL --file=FILE'.split(),
               version=__version__)
Exemple #3
0
def test_args_two_commands():
    with pytest.raises(DocoptExit):
        docopt(to_string(main_doc), 'lsa luhn'.split(), version=__version__)
Exemple #4
0
def test_args_just_command():
    args = docopt(to_string(main_doc), ['lsa'], version=__version__)

    assert DEFAULT_ARGS == args
Exemple #5
0
def test_args_none():
    with pytest.raises(DocoptExit):
        docopt(to_string(main_doc), None, version=__version__)
Exemple #6
0
def test_ok_args():
    docopt(to_string(main_doc),
           'luhn --url=URL --format=FORMAT'.split(),
           version=__version__)