diff --git a/tests/test_cloud_note.py b/tests/test_cloud_note.py index 6477e609..1b6dbdab 100644 --- a/tests/test_cloud_note.py +++ b/tests/test_cloud_note.py @@ -59,7 +59,11 @@ def cmd(): click.echo('{"score": 1}') emit_cloud_note("text") - result = CliRunner().invoke(cmd) + try: + runner = CliRunner(mix_stderr=False) # click < 8.2 mixes stderr into stdout by default + except TypeError: # click >= 8.2 removed the argument: the streams are always separate + runner = CliRunner() + result = runner.invoke(cmd) assert result.stdout == '{"score": 1}\n' assert CLOUD_NOTE in result.stderr