From 16c9185f8d8282ed49c4f88cfa85b4960229544d Mon Sep 17 00:00:00 2001 From: Thiago Monteiro Date: Tue, 19 Mar 2024 12:48:27 +0000 Subject: [PATCH] temp fix for output artifact --- runner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/runner.py b/runner.py index 3c208c9..3b2dda2 100644 --- a/runner.py +++ b/runner.py @@ -235,8 +235,14 @@ def run_with_params(params, mode="cli"): "result":resultDict}) allPass = False else: - with open('test_results.json', 'w', encoding='utf-8') as f: - json.dump(resultDict, f, ensure_ascii=False, indent=4) + if isinstance(resultDict, dict): + with open('test_results.json', 'w', encoding='utf-8') as f: + json.dump(resultDict, f, ensure_ascii=False, indent=4) + else: + with open('test_results.json', "w") as f: + for line in resultDict: + f.write(" ".join(line) + "\n") + raise Exception("Comparison between {} and {} failed.".format(\ wkfName, gsWkf.name))