def test_prompts():

    @click.command()
    @click.option('--foo', prompt=True)
    def test(foo):
        click.echo(('foo=%s' % foo))
    runner = CliRunner()
    result = runner.invoke(test, input='wau wau\n')
    assert (not result.exception)
    assert (result.output == 'Foo: wau wau\nfoo=wau wau\n')

    @click.command()
    @click.option('--foo', prompt=True, hide_input=True)
    def test(foo):
        click.echo(('foo=%s' % foo))
    runner = CliRunner()
    result = runner.invoke(test, input='wau wau\n')
    assert (not result.exception)
    assert (result.output == 'Foo: \nfoo=wau wau\n')
def test_prompts():

    @click.command()
    @click.option('--foo', prompt=True)
    def test(foo):
        click.echo(('foo=%s' % foo))
    runner = CliRunner()
    result = runner.invoke(test, input='wau wau\n')
    assert (not result.exception)
    assert (result.output == 'Foo: wau wau\nfoo=wau wau\n')

    @click.command()
    @click.option('--foo', prompt=True, hide_input=True)
    def test(foo):
        click.echo(('foo=%s' % foo))
    runner = CliRunner()
    result = runner.invoke(test, input='wau wau\n')
    assert (not result.exception)
    assert (result.output == 'Foo: \nfoo=wau wau\n')