We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35426a2 commit f070890Copy full SHA for f070890
tests/test_spinner.py
@@ -63,13 +63,10 @@ def test_spinner_redirect_force():
63
@click.command()
64
def cli():
65
stdout_io = StringIO()
66
- saved_stdout = sys.stdout
67
- sys.stdout = stdout_io # redirect stdout to a string buffer
68
- spinner = click_spinner.Spinner(force=True)
+ spinner = click_spinner.Spinner(force=True, stream=stdout_io)
69
spinner.start()
70
time.sleep(1) # allow time for a few spins
71
spinner.stop()
72
- sys.stdout = saved_stdout
73
stdout_io.flush()
74
stdout_str = stdout_io.getvalue()
75
assert len(stdout_str) > 0
0 commit comments