File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -391,15 +391,17 @@ def pytest_terminal_summary(
391
391
except FileNotFoundError :
392
392
# No MypyItems executed.
393
393
return
394
- if config .option .mypy_xfail or results .unmatched_stdout or results .stderr :
395
- terminalreporter .section (terminal_summary_title )
394
+ if not results .stdout and not results .stderr :
395
+ return
396
+ terminalreporter .section (terminal_summary_title )
397
+ if results .stdout :
396
398
if config .option .mypy_xfail :
397
399
terminalreporter .write (results .stdout )
398
400
elif results .unmatched_stdout :
399
401
color = {"red" : True } if results .status else {"green" : True }
400
402
terminalreporter .write_line (results .unmatched_stdout , ** color )
401
- if results .stderr :
402
- terminalreporter .write_line (results .stderr , yellow = True )
403
+ if results .stderr :
404
+ terminalreporter .write_line (results .stderr , yellow = True )
403
405
404
406
def pytest_unconfigure (self , config : pytest .Config ) -> None :
405
407
"""Clean up the mypy results path."""
You can’t perform that action at this time.
0 commit comments