@@ -155,7 +155,7 @@ class LocalBenchClient(BenchClient):
155
155
Client for managing local file system test suites and runs
156
156
"""
157
157
158
- def __init__ (self , config , use_s3 = False ):
158
+ def __init__ (self , config , use_s3 = False ):
159
159
if not use_s3 :
160
160
self .fs_client = LocalFSClient (config )
161
161
else :
@@ -193,7 +193,9 @@ def get_test_suites(
193
193
if name is not None :
194
194
test_suite_dir = self .fs_client .get_test_suite_dir (name )
195
195
if test_suite_dir .is_dir ():
196
- suite = self .fs_client .load_suite_with_optional_id (test_suite_dir / "suite.json" )
196
+ suite = self .fs_client .load_suite_with_optional_id (
197
+ test_suite_dir / "suite.json"
198
+ )
197
199
if suite is None :
198
200
suite = self .fs_client .get_test_suite_by_name (name )
199
201
return PaginatedTestSuites (
@@ -311,7 +313,9 @@ def get_runs_for_test_suite(
311
313
312
314
runs = []
313
315
for f in self .fs_client .get_run_files (test_suite_name ):
314
- run_obj = self .fs_client .parse_paginated_test_run (test_suite_id , _get_run_name_from_file_path (f ))
316
+ run_obj = self .fs_client .parse_paginated_test_run (
317
+ test_suite_id , _get_run_name_from_file_path (f )
318
+ )
315
319
avg_score = np .mean ([o .score for o in run_obj .test_cases ])
316
320
run_resp = TestRunMetadata (** run_obj .dict (), avg_score = float (avg_score ))
317
321
runs .append (run_resp )
@@ -345,9 +349,12 @@ def get_summary_statistics(
345
349
run_files = self .fs_client .get_run_files (test_suite_name )
346
350
347
351
if run_ids :
348
- run_name_to_file_dict = {_get_run_name_from_file_path (file ): file for file in run_files }
352
+ run_name_to_file_dict = {
353
+ _get_run_name_from_file_path (file ): file for file in run_files
354
+ }
349
355
run_names = [
350
- self .fs_client .get_run_name_from_id (test_suite_name , id ) for id in run_ids
356
+ self .fs_client .get_run_name_from_id (test_suite_name , id )
357
+ for id in run_ids
351
358
]
352
359
filtered_run_files = {
353
360
k : run_name_to_file_dict [k ]
@@ -357,7 +364,9 @@ def get_summary_statistics(
357
364
run_files = list (filtered_run_files .values ())
358
365
359
366
for f in run_files :
360
- run_obj = self .fs_client .parse_paginated_test_run (test_suite_id , _get_run_name_from_file_path (f ))
367
+ run_obj = self .fs_client .parse_paginated_test_run (
368
+ test_suite_id , _get_run_name_from_file_path (f )
369
+ )
361
370
runs .append (
362
371
_summarize_run (run = run_obj , scoring_method = suite .scoring_method )
363
372
)
0 commit comments