diff options
| author | Armin Ronacher <armin.ronacher@active-4.com> | 2014-08-11 14:23:08 +0200 |
|---|---|---|
| committer | Armin Ronacher <armin.ronacher@active-4.com> | 2014-08-11 14:23:08 +0200 |
| commit | a939618ed6096076d46ece7f8a621fe9f25f6d33 (patch) | |
| tree | b4144d87b4ff464ed7c5dfc238e52262b56a29f9 /tests/test_termui.py | |
| parent | 36112b124fdd488cf1463a0c7cd36927369c7714 (diff) | |
| download | click-a939618ed6096076d46ece7f8a621fe9f25f6d33.tar.gz | |
Added termui tests
Diffstat (limited to 'tests/test_termui.py')
| -rw-r--r-- | tests/test_termui.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_termui.py b/tests/test_termui.py new file mode 100644 index 0000000..a03a297 --- /dev/null +++ b/tests/test_termui.py @@ -0,0 +1,14 @@ +import click + + +def test_progressbar_strip_regression(runner, monkeypatch): + label = ' padded line' + + @click.command() + def cli(): + with click.progressbar(tuple(range(10)), label=label) as progress: + for thing in progress: + pass + + monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: True) + assert label in runner.invoke(cli, []).output |
