Skip to content
Myr

Add test with a hidden progressbar

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

authored by George Y. Kussumoto · committed by George Y. Kussumoto · parent 61abbef · Browse files · 1 file+13 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+13 added−0 removed

  • tests:+13 added−0 removed

1 file+13 added−0 removed

modified:tests/test_termui.py+13 added
42 unmodified lines
43 result = runner.invoke(cli, [])44 assert result.exception is None454647def test_progressbar_hidden(runner, monkeypatch):48 label = 'whatever'4950 @click.command()51 def cli():52 with click.progressbar(tuple(range(10)), label=label) as progress:53 for thing in progress:54 pass5556 monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: False)57 assert runner.invoke(cli, []).output == ''585960def test_choices_list_in_prompt(runner, monkeypatch):61 @click.command()62 @click.option('-g', type=click.Choice(['none', 'day', 'week', 'month']),63 prompt=True)
21 unmodified lines