@@ -109,8 +109,8 @@ class TEST_PROCESS_STATS:
109109cUnexpectedTests :int = 0
110110cAchtungTests :int = 0
111111
112- FailedTests = list [str ]()
113- XFailedTests = list [str ]()
112+ FailedTests = list [str , int ]()
113+ XFailedTests = list [str , int ]()
114114NotXFailedTests = list [str ]()
115115AchtungTests = list [str ]()
116116
@@ -132,19 +132,23 @@ def incrementPassedTestCount() -> None:
132132__class__ .cPassedTests += 1
133133
134134# --------------------------------------------------------------------
135- def incrementFailedTestCount (testID :str )-> None :
135+ def incrementFailedTestCount (testID :str , errCount : int )-> None :
136136assert type (testID )== str # noqa: E721
137+ assert type (errCount )== int # noqa: E721
138+ assert errCount >= 0
137139assert type (__class__ .FailedTests )== list # noqa: E721
138140
139- __class__ .FailedTests .append (testID )# raise?
141+ __class__ .FailedTests .append (( testID , errCount ) )# raise?
140142__class__ .cFailedTests += 1
141143
142144# --------------------------------------------------------------------
143- def incrementXFailedTestCount (testID :str )-> None :
145+ def incrementXFailedTestCount (testID :str , errCount : int )-> None :
144146assert type (testID )== str # noqa: E721
147+ assert type (errCount )== int # noqa: E721
148+ assert errCount >= 0
145149assert type (__class__ .XFailedTests )== list # noqa: E721
146150
147- __class__ .XFailedTests .append (testID )# raise?
151+ __class__ .XFailedTests .append (( testID , errCount ) )# raise?
148152__class__ .cXFailedTests += 1
149153
150154# --------------------------------------------------------------------
@@ -329,26 +333,25 @@ def helper__makereport__call(
329333if type (call .excinfo .value )== _pytest .outcomes .Skipped :# noqa: E721
330334assert not hasattr (rep ,"wasxfail" )
331335
332- TEST_PROCESS_STATS .incrementSkippedTestCount ()
333-
334336exitStatus = "SKIPPED"
335337reasonText = str (call .excinfo .value )
336338reasonMsgTempl = "SKIP REASON: {0}"
337339
338- elif type (call .excinfo .value )== _pytest .outcomes .XFailed :# noqa: E721
339- TEST_PROCESS_STATS .incrementXFailedTestCount (testID )
340+ TEST_PROCESS_STATS .incrementSkippedTestCount ()
340341
342+ elif type (call .excinfo .value )== _pytest .outcomes .XFailed :# noqa: E721
341343exitStatus = "XFAILED"
342344reasonText = str (call .excinfo .value )
343345reasonMsgTempl = "XFAIL REASON: {0}"
346+
347+ TEST_PROCESS_STATS .incrementXFailedTestCount (testID ,item_error_msg_count )
348+
344349else :
345350exitStatus = "XFAILED"
346351assert hasattr (rep ,"wasxfail" )
347352assert rep .wasxfail is not None
348353assert type (rep .wasxfail )== str # noqa: E721
349354
350- TEST_PROCESS_STATS .incrementXFailedTestCount (testID )
351-
352355reasonText = rep .wasxfail
353356reasonMsgTempl = "XFAIL REASON: {0}"
354357
@@ -358,6 +361,8 @@ def helper__makereport__call(
358361logging .error (call .excinfo .value )
359362item_error_msg_count += 1
360363
364+ TEST_PROCESS_STATS .incrementXFailedTestCount (testID ,item_error_msg_count )
365+
361366assert type (reasonText )== str # noqa: E721
362367
363368if reasonText != "" :
@@ -369,15 +374,15 @@ def helper__makereport__call(
369374assert call .excinfo is not None
370375assert call .excinfo .value is not None
371376
372- TEST_PROCESS_STATS .incrementFailedTestCount (testID )
373-
374377if type (call .excinfo .value )== SIGNAL_EXCEPTION :# noqa: E721
375378assert item_error_msg_count > 0
376379pass
377380else :
378381logging .error (call .excinfo .value )
379382item_error_msg_count += 1
380383
384+ TEST_PROCESS_STATS .incrementFailedTestCount (testID ,item_error_msg_count )
385+
381386exitStatus = "FAILED"
382387elif rep .outcome == "passed" :
383388assert call .excinfo is None
@@ -676,11 +681,42 @@ def helper__print_test_list(tests: list[str]) -> None:
676681
677682nTest = 0
678683
679- while nTest < len ( tests ) :
680- testID = tests [ nTest ]
681- assert type ( testID ) == str # noqa: E721
684+ for t in tests :
685+ assert type ( t ) == str # noqa: E721
686+ assert t != ""
682687nTest += 1
683- logging .info (templateLine .format (nTest ,testID ))
688+ logging .info (templateLine .format (nTest ,t ))
689+
690+
691+ # ------------------------------------------------------------------------
692+ def helper__print_test_list2 (tests :list [str ,int ])-> None :
693+ assert type (tests )== list # noqa: E721
694+
695+ assert helper__calc_W (9 )== 1
696+ assert helper__calc_W (10 )== 2
697+ assert helper__calc_W (11 )== 2
698+ assert helper__calc_W (99 )== 2
699+ assert helper__calc_W (100 )== 3
700+ assert helper__calc_W (101 )== 3
701+ assert helper__calc_W (999 )== 3
702+ assert helper__calc_W (1000 )== 4
703+ assert helper__calc_W (1001 )== 4
704+
705+ W = helper__calc_W (len (tests ))
706+
707+ templateLine = "{0:0" + str (W )+ "d}. {1} ({2})"
708+
709+ nTest = 0
710+
711+ for t in tests :
712+ assert type (t )== tuple # noqa: E721
713+ assert len (t )== 2
714+ assert type (t [0 ])== str # noqa: E721
715+ assert type (t [1 ])== int # noqa: E721
716+ assert t [0 ]!= ""
717+ assert t [1 ]>= 0
718+ nTest += 1
719+ logging .info (templateLine .format (nTest ,t [0 ],t [1 ]))
684720
685721
686722# /////////////////////////////////////////////////////////////////////////////
@@ -714,20 +750,36 @@ def LOCAL__print_test_list(header: str, test_count: int, test_list: list[str]):
714750helper__print_test_list (test_list )
715751logging .info ("" )
716752
753+ def LOCAL__print_test_list2 (
754+ header :str ,test_count :int ,test_list :list [str ,int ]
755+ ):
756+ assert type (header )== str # noqa: E721
757+ assert type (test_count )== int # noqa: E721
758+ assert type (test_list )== list # noqa: E721
759+ assert header != ""
760+ assert test_count >= 0
761+ assert len (test_list )== test_count
762+
763+ LOCAL__print_line1_with_header (header )
764+ logging .info ("" )
765+ if len (test_list )> 0 :
766+ helper__print_test_list2 (test_list )
767+ logging .info ("" )
768+
717769# fmt: off
718770LOCAL__print_test_list (
719771"ACHTUNG TESTS" ,
720772TEST_PROCESS_STATS .cAchtungTests ,
721773TEST_PROCESS_STATS .AchtungTests ,
722774 )
723775
724- LOCAL__print_test_list (
776+ LOCAL__print_test_list2 (
725777"FAILED TESTS" ,
726778TEST_PROCESS_STATS .cFailedTests ,
727779TEST_PROCESS_STATS .FailedTests
728780 )
729781
730- LOCAL__print_test_list (
782+ LOCAL__print_test_list2 (
731783"XFAILED TESTS" ,
732784TEST_PROCESS_STATS .cXFailedTests ,
733785TEST_PROCESS_STATS .XFailedTests ,