Skip to content
Myr

Add test for #146

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Rotem Yaari · committed by Armin Ronacher · parent a273c20 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • tests:+12 added−0 removed

1 file+12 added−0 removed

modified:tests/test_options.py+12 added
1# -*- coding: utf-8 -*-2import re3import os4import click5import pytest678def test_prefixes(runner):9 @click.command()
31 unmodified lines
41 assert not result.exception42 assert result.output == 'verbosity=0\n'434445@pytest.mark.parametrize('unknown_flag', ['--foo', '-f'])46def test_unknown_options(runner, unknown_flag):47 @click.command()48 def cli():49 pass5051 result = runner.invoke(cli, [unknown_flag])52 assert result.exception53 assert 'no such option: {0}'.format(unknown_flag) in result.output545556def test_multiple_required(runner):57 @click.command()58 @click.option('-m', '--message', multiple=True, required=True)59 def cli(message):
144 unmodified lines