summaryrefslogtreecommitdiff
path: root/tests/compathelper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compathelper.py')
-rw-r--r--tests/compathelper.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/compathelper.py b/tests/compathelper.py
index 668e60a5..e5de5506 100644
--- a/tests/compathelper.py
+++ b/tests/compathelper.py
@@ -1,4 +1,5 @@
import sys
+import collections
if sys.version_info >= (3, 0):
'''
@@ -62,8 +63,15 @@ if sys.version_info >= (3, 0):
'''
_unicode = lambda s: str(s)
+
+ callable = lambda x: isinstance(x, collections.Callable)
+ from io import StringIO
+ StringIO
else:
_long = long
_basestring = basestring
_bytes = str
_unicode = lambda s: unicode(s, 'UTF-8')
+ callable = callable
+ from StringIO import StringIO
+ StringIO