File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1+ The short test summary is displayed after passes with output (``-rP ``).
Original file line number Diff line number Diff line change @@ -684,9 +684,9 @@ def pytest_terminal_summary(self):
684684 self .summary_errors ()
685685 self .summary_failures ()
686686 self .summary_warnings ()
687+ self .summary_passes ()
687688 yield
688689 self .short_test_summary ()
689- self .summary_passes ()
690690 # Display any extra warnings from teardown here (if any).
691691 self .summary_warnings ()
692692
Original file line number Diff line number Diff line change @@ -769,11 +769,19 @@ def test_pass_no_output():
769769 assert "test_pass_has_output" not in s
770770 assert "Four score and seven years ago..." not in s
771771 assert "test_pass_no_output" not in s
772- result = testdir .runpytest ("-rP " )
772+ result = testdir .runpytest ("-rPp " )
773773 result .stdout .fnmatch_lines (
774- ["*test_pass_has_output*" , "Four score and seven years ago..." ]
774+ [
775+ "*= PASSES =*" ,
776+ "*_ test_pass_has_output _*" ,
777+ "*- Captured stdout call -*" ,
778+ "Four score and seven years ago..." ,
779+ "*= short test summary info =*" ,
780+ "PASSED test_pass_output_reporting.py::test_pass_has_output" ,
781+ "PASSED test_pass_output_reporting.py::test_pass_no_output" ,
782+ "*= 2 passed in *" ,
783+ ]
775784 )
776- assert "test_pass_no_output" not in result .stdout .str ()
777785
778786
779787def test_color_yes (testdir ):
You can’t perform that action at this time.
0 commit comments