diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rwxr-xr-x | setup.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 5873a42..eb98332 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ python: - "2.6" - "2.7" script: "python setup.py test" +install: "if [[ $TRAVIS_PYTHON_VERSION = 2.6 ]]; then pip install unittest2 --use-mirrors; fi" notifications: email: false irc: "irc.freenode.org#xelnext" @@ -41,7 +41,11 @@ class test(cmd.Command): def run(self): """Run the test suite.""" - import unittest + try: + import unittest2 as unittest + except ImportError: + import unittest + if self.verbose: verbosity=1 else: |