@@ -116,6 +116,11 @@ class TEST_PROCESS_STATS:
116
116
WarningTests = list [str , int ]()
117
117
AchtungTests = list [str ]()
118
118
119
+ cTotalDuration : datetime .timedelta = datetime .timedelta ()
120
+
121
+ cTotalErrors : int = 0
122
+ cTotalWarnings : int = 0
123
+
119
124
# --------------------------------------------------------------------
120
125
def incrementTotalTestCount () -> None :
121
126
assert type (__class__ .cTotalTests ) == int # noqa: E721
@@ -169,6 +174,14 @@ def incrementFailedTestCount(testID: str, errCount: int) -> None:
169
174
assert __class__ .cFailedTests > 0
170
175
assert len (__class__ .FailedTests ) == __class__ .cFailedTests
171
176
177
+ # --------
178
+ assert type (__class__ .cTotalErrors ) == int # noqa: E721
179
+ assert __class__ .cTotalErrors >= 0
180
+
181
+ __class__ .cTotalErrors += errCount
182
+
183
+ assert __class__ .cTotalErrors > 0
184
+
172
185
# --------------------------------------------------------------------
173
186
def incrementXFailedTestCount (testID : str , errCount : int ) -> None :
174
187
assert type (testID ) == str # noqa: E721
@@ -225,6 +238,14 @@ def incrementWarningTestCount(testID: str, warningCount: int) -> None:
225
238
assert __class__ .cWarningTests > 0
226
239
assert len (__class__ .WarningTests ) == __class__ .cWarningTests
227
240
241
+ # --------
242
+ assert type (__class__ .cTotalWarnings ) == int # noqa: E721
243
+ assert __class__ .cTotalWarnings >= 0
244
+
245
+ __class__ .cTotalWarnings += warningCount
246
+
247
+ assert __class__ .cTotalWarnings > 0
248
+
228
249
# --------------------------------------------------------------------
229
250
def incrementUnexpectedTests () -> None :
230
251
assert type (__class__ .cUnexpectedTests ) == int # noqa: E721
@@ -454,6 +475,7 @@ def helper__makereport__call(
454
475
logging .error (call .excinfo .value )
455
476
item_error_msg_count += 1
456
477
478
+ assert item_error_msg_count > 0
457
479
TEST_PROCESS_STATS .incrementFailedTestCount (testID , item_error_msg_count )
458
480
459
481
exitStatus = "FAILED"
@@ -487,6 +509,14 @@ def helper__makereport__call(
487
509
if item_warning_msg_count > 0 :
488
510
TEST_PROCESS_STATS .incrementWarningTestCount (testID , item_warning_msg_count )
489
511
512
+ # --------
513
+ assert type (TEST_PROCESS_STATS .cTotalDuration ) == datetime .timedelta # noqa: E721
514
+ assert type (testDurration ) == datetime .timedelta # noqa: E721
515
+
516
+ TEST_PROCESS_STATS .cTotalDuration += testDurration
517
+
518
+ assert testDurration <= TEST_PROCESS_STATS .cTotalDuration
519
+
490
520
# --------
491
521
logging .info ("*" )
492
522
logging .info ("* DURATION : {0}" .format (timedelta_to_human_text (testDurration )))
@@ -892,6 +922,23 @@ def LOCAL__print_test_list2(
892
922
logging .info (" UNEXPECTED : {0}" .format (TEST_PROCESS_STATS .cUnexpectedTests ))
893
923
logging .info ("" )
894
924
925
+ assert type (TEST_PROCESS_STATS .cTotalDuration ) == datetime .timedelta # noqa: E721
926
+
927
+ LOCAL__print_line1_with_header ("TIME" )
928
+ logging .info ("" )
929
+ logging .info (
930
+ " TOTAL DURATION: {0}" .format (
931
+ timedelta_to_human_text (TEST_PROCESS_STATS .cTotalDuration )
932
+ )
933
+ )
934
+ logging .info ("" )
935
+
936
+ LOCAL__print_line1_with_header ("TOTAL INFORMATION" )
937
+ logging .info ("" )
938
+ logging .info (" TOTAL ERROR COUNT : {0}" .format (TEST_PROCESS_STATS .cTotalErrors ))
939
+ logging .info (" TOTAL WARNING COUNT: {0}" .format (TEST_PROCESS_STATS .cTotalWarnings ))
940
+ logging .info ("" )
941
+
895
942
896
943
# /////////////////////////////////////////////////////////////////////////////
897
944
0 commit comments