Skip to content

Instantly share code, notes, and snippets.

@samueljackson92
Created July 19, 2017 08:18
Show Gist options
  • Save samueljackson92/0284ee3dbe41a495459515f8622231a0 to your computer and use it in GitHub Desktop.
Save samueljackson92/0284ee3dbe41a495459515f8622231a0 to your computer and use it in GitHub Desktop.
Useful python functions
def printname(func):
"""
Prints the name of a decorated method
This can be useful for debugging unit tests which
interfere with each other.
"""
def wrapper(self):
print func.__name__
return func(self)
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment