@@ -262,7 +262,7 @@ def mark_results(testrail_session: TestRail, test_results):
262
262
durations .append (all_durations [i ])
263
263
logging .warning (
264
264
f"Setting the following test cases in run { run_id } to { category } : { test_cases_ids } "
265
- )
265
+ )
266
266
logging .warning (
267
267
f"Setting the following test cases { test_cases_ids } to duration { durations } "
268
268
)
@@ -272,7 +272,7 @@ def mark_results(testrail_session: TestRail, test_results):
272
272
testrail_suite_id = suite_id ,
273
273
test_case_ids = test_cases_ids ,
274
274
status = category ,
275
- elapsed = durations
275
+ elapsed = durations ,
276
276
)
277
277
278
278
@@ -562,7 +562,9 @@ def collect_changes(testrail_session: TestRail, report):
562
562
563
563
version_str = metadata .get ("fx_version" )
564
564
plan_title = get_plan_title (version_str , channel )
565
- logging .warning (f"Got plan title: { plan_title } from version { version_str } and channel { channel } " )
565
+ logging .warning (
566
+ f"Got plan title: { plan_title } from version { version_str } and channel { channel } "
567
+ )
566
568
plan_match = PLAN_NAME_RE .match (plan_title )
567
569
(_ , major ) = [plan_match [n ] for n in range (1 , 3 )]
568
570
config = metadata .get ("machine_config" )
@@ -671,15 +673,21 @@ def collect_changes(testrail_session: TestRail, report):
671
673
# Tests reported as rerun are a problem -- we need to know pass/fail
672
674
if outcome == "rerun" :
673
675
outcome = test .get ("call" ).get ("outcome" )
674
- duration = test ['setup' ]['duration' ] + test ['call' ]['duration' ] + test ['teardown' ]['duration' ]
676
+ duration = (
677
+ test ["setup" ]["duration" ]
678
+ + test ["call" ]["duration" ]
679
+ + test ["teardown" ]["duration" ]
680
+ )
675
681
logging .info (f"TC: { test_case } : { outcome } using { duration } s " )
676
682
677
683
if not results_by_suite .get (suite_id ):
678
684
results_by_suite [suite_id ] = {}
679
685
durations_by_suite [suite_id ] = {}
680
686
results_by_suite [suite_id ][test_case ] = outcome
681
687
durations_by_suite [suite_id ].setdefault (test_case , 0 )
682
- durations_by_suite [suite_id ][test_case ] = round (durations_by_suite [suite_id ][test_case ] + duration , 2 )
688
+ durations_by_suite [suite_id ][test_case ] = round (
689
+ durations_by_suite [suite_id ][test_case ] + duration , 2
690
+ )
683
691
684
692
if suite_id != last_suite_id :
685
693
# When we get the last test_case in a suite, add entry, run, results
@@ -695,7 +703,7 @@ def collect_changes(testrail_session: TestRail, report):
695
703
"config_id" : config_id ,
696
704
"cases" : cases_in_suite ,
697
705
"results" : results_by_suite [last_suite_id ],
698
- "durations" : durations_by_suite [last_suite_id ]
706
+ "durations" : durations_by_suite [last_suite_id ],
699
707
}
700
708
701
709
full_test_results = merge_results (
@@ -716,7 +724,7 @@ def collect_changes(testrail_session: TestRail, report):
716
724
"config_id" : config_id ,
717
725
"cases" : cases_in_suite ,
718
726
"results" : results_by_suite [last_suite_id ],
719
- "durations" : durations_by_suite [last_suite_id ]
727
+ "durations" : durations_by_suite [last_suite_id ],
720
728
}
721
729
722
730
logging .info (f"n run { last_suite_id } , { last_description } " )
0 commit comments