From fb13a83d152b8b1a2e64e9b9d619c3e2cec24fd2 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sat, 5 Aug 2023 09:51:53 -0700 Subject: [PATCH] Add more coding challenge (#254) Signed-off-by: Merwane Hamadi --- agbenchmark/challenges | 2 +- agbenchmark/utils/challenge.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/agbenchmark/challenges b/agbenchmark/challenges index 00d5390e..c57e0bf3 160000 --- a/agbenchmark/challenges +++ b/agbenchmark/challenges @@ -1 +1 @@ -Subproject commit 00d5390ece70659d5b1afe511856fbb56dc0caf4 +Subproject commit c57e0bf36ac52b5586821503582724967677816f diff --git a/agbenchmark/utils/challenge.py b/agbenchmark/utils/challenge.py index c7590cec..c8a62560 100644 --- a/agbenchmark/utils/challenge.py +++ b/agbenchmark/utils/challenge.py @@ -96,7 +96,10 @@ class Challenge(ABC): capture_output=True, text=True, ) - files_contents.append(result.stdout) + if "error" in result.stderr: + print(result.stderr) + assert False, result.stderr + files_contents.append(f"Output: {result.stdout}\n") else: with open(file_path, "r") as f: files_contents.append(f.read())