-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
Description
Printing any arbitrary amount of new lines at the end of the staff solution for Mario causes this error message:
:) mario.c exists
:) mario.c compiles
:) rejects a height of -1
:) rejects a height of 0
:( handles a height of 1 correctly
expected: "# #"
actual: "# #"
did you add too much trailing whitespace to the end of your pyramid?
:( handles a height of 2 correctly
expected: "...# ##"
actual: "...# ##"
did you add too much trailing whitespace to the end of your pyramid?
:( handles a height of 8 correctly
expected: "...#####"
actual: "...#####"
did you add too much trailing whitespace to the end of your pyramid?
:( rejects a height of -1, and then accepts a height of 2
expected: "...# ##"
actual: "...# ##"
did you add too much trailing whitespace to the end of your pyramid?
:) rejects a non-numeric height of "foo"
:) rejects a non-numeric height of "" This is probably because of this line under check_pyramids() in problems/mario/less/__init__.py:
output = [line for line in output.splitlines() if line != ""]which removes all empty lines, including new lines, from the user's output, thus causing the diff to show equivalent expected and actual answers.