Partial merge of trunk progress. Some tests still fail.
[cython.git] / tests / run / literalslice.pyx
index 6b1ede72d8c82a2e7da712a292e43c6ae7b6af3d..901ee890e381406ad8320841feedfb29fbc0c702 100644 (file)
@@ -1,6 +1,6 @@
 __doc__ = u"""
   >>> test_str(1)
-  b'b'
+  'b'
 
   >>> test_unicode_ascii(2)
   u'c'
@@ -10,24 +10,24 @@ __doc__ = u"""
   >>> test_int_list(2)
   3
   >>> test_str_list(1)
-  b'bcd'
+  'bcd'
 
   >>> test_int_tuple(2)
   3
   >>> test_str_tuple(0)
-  b'a'
+  'a'
   >>> test_mix_tuple(1)
-  b'abc'
+  'abc'
   >>> test_mix_tuple(0)
   1
 """
 
 import sys
-if sys.version_info[0] < 3:
-    __doc__ = __doc__.replace("  b'", "  '")
+IS_PY3 = sys.version_info[0] >= 3
+if IS_PY3:
+    __doc__ = __doc__.replace(u" u'", u" '")
 else:
-    __doc__ = __doc__.replace("  u'", "  '")
-
+    __doc__ = __doc__.replace(u" b'", u" '")
 
 def test_str(n):
     return "abcd"[n]