Skip to content

Instantly share code, notes, and snippets.

@lsbardel
Created March 13, 2012 11:40
Show Gist options
  • Save lsbardel/2028294 to your computer and use it in GitHub Desktop.
Save lsbardel/2028294 to your computer and use it in GitHub Desktop.
unittest or unittest2
import sys
if sys.version_info >= (2,7):
from unittest import *
else:
try:
from unittest2 import *
except ImportError:
print('To run tests in python 2.6 you need to install\
the unitest2 package')
exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment