Skip to content

Commit

Permalink
Add back empty output check
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacl committed Sep 27, 2022
1 parent eceabb0 commit 964305a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gradescope_utils/autograder_utils/json_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ def buildResult(self, test, err=None):
if hide_errors_message:
output += hide_errors_message
else:
# create a double newline
if output.endswith('\n'):
output += '\n'
else:
output += '\n\n'
if output:
# Create a double newline if output is not empty
if output.endswith('\n'):
output += '\n'
else:
output += '\n\n'
output += "Test Failed: {0}\n".format(err[1])
result = {
"name": self.getDescription(test),
Expand Down

0 comments on commit 964305a

Please sign in to comment.