Created
January 4, 2016 20:33
-
-
Save dizballanze/f36c8dc2f5f8ceb0b882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
>>> sort([4,2,4,3,6,1]) | |
[1, 2, 4, 4, 6] | |
""" | |
def sort(a): | |
return a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ insertion-sort python -m doctest ins_sort.py | |
********************************************************************** | |
File "ins_sort.py", line 2, in ins_sort | |
Failed example: | |
sort([4,2,4,3,6,1]) | |
Expected: | |
[1, 2, 4, 4, 6] | |
Got: | |
[4, 2, 4, 3, 6, 1] | |
********************************************************************** | |
1 items had failures: | |
1 of 1 in ins_sort | |
***Test Failed*** 1 failures. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment