diff --git a/scripts/sample_grader.py b/scripts/sample_grader.py index 50f0de51..ffa310a5 100644 --- a/scripts/sample_grader.py +++ b/scripts/sample_grader.py @@ -9,9 +9,14 @@ import subprocess import sys -process = subprocess.run([sys.executable, sys.argv[1]], check=False) +process = subprocess.run( + [sys.executable, sys.argv[1]], + capture_output=True, + check=False, +) + if process.returncode != 0: - print("Encountered exception for test case 0:") + # let the student see the error print(process.stderr) print("Score: 0%") else: