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):
684
684
self .summary_errors ()
685
685
self .summary_failures ()
686
686
self .summary_warnings ()
687
+ self .summary_passes ()
687
688
yield
688
689
self .short_test_summary ()
689
- self .summary_passes ()
690
690
# Display any extra warnings from teardown here (if any).
691
691
self .summary_warnings ()
692
692
Original file line number Diff line number Diff line change @@ -769,11 +769,19 @@ def test_pass_no_output():
769
769
assert "test_pass_has_output" not in s
770
770
assert "Four score and seven years ago..." not in s
771
771
assert "test_pass_no_output" not in s
772
- result = testdir .runpytest ("-rP " )
772
+ result = testdir .runpytest ("-rPp " )
773
773
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
+ ]
775
784
)
776
- assert "test_pass_no_output" not in result .stdout .str ()
777
785
778
786
779
787
def test_color_yes (testdir ):
You can’t perform that action at this time.
0 commit comments