mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
fix python 2.6 unitests which with the backport package unittest2
This commit is contained in:
parent
054c976ad6
commit
1c8bb21790
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue