Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
maximusunc committed Jun 22, 2024
1 parent 91ff245 commit 96a58c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
9 changes: 7 additions & 2 deletions test_harness/result_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ def collect_result(
result_type = self.result_types.get(
get_tag(report[agent]), "Test Error"
)
if query_type in self.stats[agent] and result_type in self.stats[agent][query_type]:
if (
query_type in self.stats[agent]
and result_type in self.stats[agent][query_type]
):
self.stats[agent][query_type][result_type] += 1
else:
self.logger.error(f"Got {query_type} and {result_type} and can't put into stats!")
self.logger.error(
f"Got {query_type} and {result_type} and can't put into stats!"
)

# add result to csv
agent_results = ",".join(
Expand Down
4 changes: 3 additions & 1 deletion test_harness/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ async def run_tests(
for asset in test.test_assets:
# throw out any assets with unsupported expected outputs, i.e. OverlyGeneric
if asset.expected_output not in collector.query_types:
logger.warning(f"Asset id {asset.id} has unsupported expected output.")
logger.warning(
f"Asset id {asset.id} has unsupported expected output."
)
continue
# create test in Test Dashboard
test_id = ""
Expand Down
8 changes: 6 additions & 2 deletions test_harness/runner/query_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,13 @@ async def get_ars_responses(
# add response to output
if response is not None:
status_code = response.get("fields", {}).get("code", 410)
self.logger.info(f"Got reponse for {infores} with status code {status_code}.")
self.logger.info(
f"Got reponse for {infores} with status code {status_code}."
)
responses[infores] = {
"response": response.get("fields", {}).get("data", {"message": {"results": []}}),
"response": response.get("fields", {}).get(
"data", {"message": {"results": []}}
),
"status_code": status_code,
}
else:
Expand Down

0 comments on commit 96a58c7

Please sign in to comment.