For feature request #12 #13
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
hack.pyin Issue 1 to support a solution which returns errors when strange inputs are encountered, updatessolution.pyto error when input validation fails.Why:
Closes #12
What's being changed:
hack.pytest 4 in Issue 1 has been changed to assert the return string from validorder is not equal to the success message where the balance is all paid off.solution.pyin Issue1 has been changed to return with error messages for all validation failures.solution.pyhas two new functions, validamount and validquantity. The first reduces code duplication but the second was also included so that the code and flow from the original validorder function is clearer