summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorJoshua Marshall <catchjosh@gmail.com>2015-10-05 17:17:16 -0700
committerJoshua Marshall <catchjosh@gmail.com>2015-10-05 17:17:16 -0700
commita39d1f9debff84b2097a2788896ad61867ad1a0e (patch)
treed2da5ea2bb5fdd7c0636f294ca843aeee83520cb /tests.py
parentce0c9e2814ec184cd2e29b1010c085482f72aa1b (diff)
downloadjsonrpclib-a39d1f9debff84b2097a2788896ad61867ad1a0e.tar.gz
Adding unittest2 for Python <= 2.6
Diffstat (limited to 'tests.py')
-rw-r--r--tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index 5661b8c..386275e 100644
--- a/tests.py
+++ b/tests.py
@@ -25,7 +25,8 @@ from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCRequestHandler
import socket
import tempfile
-import unittest
+import sys
+
import os
try:
import json
@@ -33,6 +34,11 @@ except ImportError:
import simplejson as json
from threading import Thread
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
PORTS = range(8000, 8999)