Skip to content

Instantly share code, notes, and snippets.

@abehmiel
Created July 28, 2017 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abehmiel/961df79688669c012bcc874cee140e11 to your computer and use it in GitHub Desktop.
Save abehmiel/961df79688669c012bcc874cee140e11 to your computer and use it in GitHub Desktop.
AAA test sketch
# from http://jamescooke.info/arrange-act-assert-pattern-for-python-developers.html
# from x import *
def test_reverse():
"""
list.reverse inverts the order of items in a list, in place
"""
greek = ['alpha', 'beta', 'gamma', 'delta']
result = greek.reverse()
assert result is None
assert greek == ['delta', 'gamma', 'beta', 'alpha']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment