[pygobject/py3k] Common _bytes & _unicode names



commit 7ee5c7649acb1fe03cbfe2cb23c772a06053b8f3
Author: John Ehresman <jpe wingware com>
Date:   Thu Apr 15 18:00:51 2010 -0400

    Common _bytes & _unicode names

 tests/common.py |   10 ++++++++++
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]