@@ -1204,7 +1204,7 @@ def _build_normal_summary_stats_line(
1204
1204
count = len (reports )
1205
1205
color = _color_for_type .get (key , _color_for_type_default )
1206
1206
markup = {color : True , "bold" : color == main_color }
1207
- parts .append (("%d %s" % _make_plural (count , key ), markup ))
1207
+ parts .append (("%d %s" % pluralize (count , key ), markup ))
1208
1208
1209
1209
if not parts :
1210
1210
parts = [("no tests ran" , {_color_for_type_default : True })]
@@ -1223,9 +1223,7 @@ def _build_collect_only_summary_stats_line(
1223
1223
1224
1224
elif deselected == 0 :
1225
1225
main_color = "green"
1226
- collected_output = "%d %s collected" % _make_plural (
1227
- self ._numcollected , "test"
1228
- )
1226
+ collected_output = "%d %s collected" % pluralize (self ._numcollected , "test" )
1229
1227
parts = [(collected_output , {main_color : True })]
1230
1228
else :
1231
1229
all_tests_were_deselected = self ._numcollected == deselected
@@ -1241,7 +1239,7 @@ def _build_collect_only_summary_stats_line(
1241
1239
1242
1240
if errors :
1243
1241
main_color = _color_for_type ["error" ]
1244
- parts += [("%d %s" % _make_plural (errors , "error" ), {main_color : True })]
1242
+ parts += [("%d %s" % pluralize (errors , "error" ), {main_color : True })]
1245
1243
1246
1244
return parts , main_color
1247
1245
@@ -1329,7 +1327,7 @@ def _folded_skips(
1329
1327
_color_for_type_default = "yellow"
1330
1328
1331
1329
1332
- def _make_plural (count : int , noun : str ) -> Tuple [int , str ]:
1330
+ def pluralize (count : int , noun : str ) -> Tuple [int , str ]:
1333
1331
# No need to pluralize words such as `failed` or `passed`.
1334
1332
if noun not in ["error" , "warnings" , "test" ]:
1335
1333
return count , noun
0 commit comments