Skip to content

Commit 7b77b88

Browse files
committed
Fix test fails on Python 2.6
TestCase.assertIsNone() is in Python 2.7+ and Python 3.1+
1 parent 3b6d12b commit 7b77b88

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

test/test_msgpackrpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import threading
2-
import unittest
2+
try:
3+
import unittest2 as unittest
4+
except ImportError:
5+
import unittest
36

47
import helper
58
import msgpackrpc

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ deps=
55
pytest
66
six
77
commands=py.test test
8+
[testenv:py26]
9+
deps=
10+
pytest
11+
six
12+
unittest2
13+
commands=py.test test

0 commit comments

Comments
 (0)