add a diff to see what is wrong in ubuntu test

This commit is contained in:
Nathan Page 2020-10-25 16:01:58 -04:00
parent f6d1496213
commit 3da87273a2
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import difflib
import io import io
import os import os
@ -37,6 +38,11 @@ def check_output(output_file: str, output: str) -> None:
print("Make sure your console is tall enough or it may look odd") print("Make sure your console is tall enough or it may look odd")
print("Current Output:\n", output) print("Current Output:\n", output)
print("Correct Output:\n", correct_output) print("Correct Output:\n", correct_output)
if output != correct_output:
difflib.unified_diff(
correct_output, output, fromfile="Correct Output", tofile="Current Output"
)
assert output == correct_output, "Console output differs from the correct output" assert output == correct_output, "Console output differs from the correct output"