mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +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:
|
install:
|
||||||
- pip install pylint flake8 coveralls
|
- pip install pylint flake8 coveralls
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
|
- 'if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi'
|
||||||
script:
|
script:
|
||||||
- nosetests --with-coverage --cover-package telegram/
|
- nosetests --with-coverage --cover-package telegram/
|
||||||
- flake8 telegram
|
- flake8 telegram
|
||||||
|
|
|
@ -20,9 +20,14 @@
|
||||||
"""This module contains a object that represents Tests for Telegram Bot"""
|
"""This module contains a object that represents Tests for Telegram Bot"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info[0:2] == (2, 6):
|
||||||
|
import unittest2 as unittest
|
||||||
|
else:
|
||||||
|
import unittest
|
||||||
|
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
|
|
||||||
import telegram
|
import telegram
|
||||||
|
|
Loading…
Add table
Reference in a new issue