1111import platform
1212import sys
1313import time
14+ from functools import partial
1415
1516import attr
1617import pluggy
@@ -878,7 +879,7 @@ def short_test_summary(self):
878879 if not self .reportchars :
879880 return
880881
881- def show_simple (lines , stat ):
882+ def show_simple (stat , lines ):
882883 failed = self .stats .get (stat )
883884 if failed :
884885 config = self .config
@@ -928,12 +929,6 @@ def show_skipped(lines):
928929 "%s [%d] %s: %s" % (verbose_word , num , fspath , reason )
929930 )
930931
931- def shower (stat ):
932- def show_ (lines ):
933- return show_simple (lines , stat )
934-
935- return show_
936-
937932 def _get_report_str (config , report ):
938933 _category , _short , verbose = config .hook .pytest_report_teststatus (
939934 report = report , config = config
@@ -947,12 +942,12 @@ def _get_pos(config, rep):
947942 REPORTCHAR_ACTIONS = {
948943 "x" : show_xfailed ,
949944 "X" : show_xpassed ,
950- "f" : shower ( "failed" ),
951- "F" : shower ( "failed" ),
945+ "f" : partial ( show_simple , "failed" ),
946+ "F" : partial ( show_simple , "failed" ),
952947 "s" : show_skipped ,
953948 "S" : show_skipped ,
954- "p" : shower ( "passed" ),
955- "E" : shower ( "error" ),
949+ "p" : partial ( show_simple , "passed" ),
950+ "E" : partial ( show_simple , "error" ),
956951 }
957952
958953 lines = []
0 commit comments