Skip to content

Commit 6cf2a04

Browse files
committed
add test support for py2.6 (unittest2)
1 parent ea296e8 commit 6cf2a04

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
maintainer_email = '[email protected]',
2121
packages=find_packages(),
2222
tests_require=[
23+
'unittest2',
2324
'mock',
2425
],
2526
test_suite='tests',

tests.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
import json
44
from redis.client import PubSub
55
from mock import patch
6-
import unittest
76
from tyron.tyron import application
87
from tyron.tyron import subscriptions
98
from tyron.tyron import RedisSub
109

10+
try:
11+
import unittest2 as unittest
12+
except ImportError:
13+
import unittest
1114

1215
redis_pubsub = RedisSub('channel', 'localhost', 6379, 1)
1316
pubsub_channel = []

0 commit comments

Comments
 (0)