diff --git a/.travis.yml b/.travis.yml index e5a204d01..0b683c68a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ python: install: - pip install pylint flake8 coveralls - pip install -r requirements.txt + - 'if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi' script: - nosetests --with-coverage --cover-package telegram/ - flake8 telegram diff --git a/tests/test_bot.py b/tests/test_bot.py index 8c6d9949b..47c2c9cc1 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -20,9 +20,14 @@ """This module contains a object that represents Tests for Telegram Bot""" import os -import unittest from datetime import datetime import sys + +if sys.version_info[0:2] == (2, 6): + import unittest2 as unittest +else: + import unittest + sys.path.append('.') import telegram