Skip to content

Commit ef423b9

Browse files
committed
Strip command line output in correctness check
Fixes issue with error checking on Windows (closes #10).
1 parent ec3b50b commit ef423b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EulerPy/euler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def verify_answer(problem):
126126
except IndexError:
127127
output = "[no output]"
128128

129-
is_correct = output == solution
129+
is_correct = output.strip() == solution
130130
click.secho(
131131
output, bold=True, nl=False, fg=('green' if is_correct else 'red')
132132
)

0 commit comments

Comments
 (0)