11
11
import platform
12
12
import sys
13
13
import time
14
+ from functools import partial
14
15
15
16
import attr
16
17
import pluggy
@@ -878,7 +879,7 @@ def short_test_summary(self):
878
879
if not self .reportchars :
879
880
return
880
881
881
- def show_simple (lines , stat ):
882
+ def show_simple (stat , lines ):
882
883
failed = self .stats .get (stat )
883
884
if failed :
884
885
config = self .config
@@ -928,12 +929,6 @@ def show_skipped(lines):
928
929
"%s [%d] %s: %s" % (verbose_word , num , fspath , reason )
929
930
)
930
931
931
- def shower (stat ):
932
- def show_ (lines ):
933
- return show_simple (lines , stat )
934
-
935
- return show_
936
-
937
932
def _get_report_str (config , report ):
938
933
_category , _short , verbose = config .hook .pytest_report_teststatus (
939
934
report = report , config = config
@@ -947,12 +942,12 @@ def _get_pos(config, rep):
947
942
REPORTCHAR_ACTIONS = {
948
943
"x" : show_xfailed ,
949
944
"X" : show_xpassed ,
950
- "f" : shower ( "failed" ),
951
- "F" : shower ( "failed" ),
945
+ "f" : partial ( show_simple , "failed" ),
946
+ "F" : partial ( show_simple , "failed" ),
952
947
"s" : show_skipped ,
953
948
"S" : show_skipped ,
954
- "p" : shower ( "passed" ),
955
- "E" : shower ( "error" ),
949
+ "p" : partial ( show_simple , "passed" ),
950
+ "E" : partial ( show_simple , "error" ),
956
951
}
957
952
958
953
lines = []
0 commit comments