Skip to content

Commit 89b4868

Browse files
committed
Fix stdout function on testing.Result
1 parent f406a8b commit 89b4868

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

consolekit/testing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ def stdout(self) -> str:
154154
The standard output as a string.
155155
"""
156156

157-
return super().stdout
157+
if _click_version >= (8, 2) and self.runner.mix_stderr:
158+
return self.output
159+
else:
160+
return super().stdout
158161

159162
@property
160163
def stderr(self) -> str:
@@ -197,10 +200,7 @@ def check_stdout(
197200

198201
__tracebackhide__ = True
199202

200-
if _click_version >= (8, 2) and self.runner.mix_stderr:
201-
check_file_regression(self.output.rstrip(), file_regression, extension=extension, **kwargs)
202-
else:
203-
check_file_regression(self.stdout.rstrip(), file_regression, extension=extension, **kwargs)
203+
check_file_regression(self.stdout.rstrip(), file_regression, extension=extension, **kwargs)
204204

205205
return True
206206

0 commit comments

Comments
 (0)