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(
391391 except FileNotFoundError :
392392 # No MypyItems executed.
393393 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 :
396398 if config .option .mypy_xfail :
397399 terminalreporter .write (results .stdout )
398400 elif results .unmatched_stdout :
399401 color = {"red" : True } if results .status else {"green" : True }
400402 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 )
403405
404406 def pytest_unconfigure (self , config : pytest .Config ) -> None :
405407 """Clean up the mypy results path."""
You can’t perform that action at this time.
0 commit comments