Skip to content

Instantly share code, notes, and snippets.

@dizballanze
Created January 4, 2016 20:33
Show Gist options
  • Save dizballanze/f36c8dc2f5f8ceb0b882 to your computer and use it in GitHub Desktop.
Save dizballanze/f36c8dc2f5f8ceb0b882 to your computer and use it in GitHub Desktop.
"""
>>> sort([4,2,4,3,6,1])
[1, 2, 4, 4, 6]
"""
def sort(a):
return a
➜ 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