summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/common.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/common.py b/tests/common.py
index ff30ec1..bd7951c 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -48,3 +48,13 @@ def importModule(module, directory, name=None):
raise AssertionError('module %s imported from wrong location. Expected %s, got %s' % (
module, expected, current))
return obj
+
+try:
+ _bytes = bytes
+except NameError:
+ _bytes = str
+
+try:
+ _unicode = unicode
+except NameError:
+ _unicode = str