Unittest2 support for Py2.6

This commit is contained in:
2014-03-28 23:57:23 +00:00
parent bac43705a4
commit efc435d1d4
2 changed files with 13 additions and 4 deletions

View File

@@ -1,8 +1,13 @@
#!/usr/bin/env python
import sys
from setuptools import setup
from ts3 import __version__
test_require = ['mock']
if sys.version < '2.7':
test_require.append('unittest2')
setup(
name="python-ts3",
version=__version__,
@@ -14,7 +19,7 @@ setup(
packages=['ts3'],
scripts=['examples/gents3privkey.py'],
test_suite='ts3.test.suite',
test_require=test_require,
classifiers=[
'License :: OSI Approved :: BSD License',
'Topic :: Internet',

View File

@@ -1,4 +1,8 @@
import unittest
try:
import unittest2 as unittest
except ImportError:
import unittest
import socket
import threading
import time