unicode test fixes
authorStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 20:28:54 +0000 (21:28 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 20:28:54 +0000 (21:28 +0100)
18 files changed:
tests/run/call_crash.pyx
tests/run/carrays.pyx
tests/run/cdef_opt.pyx
tests/run/cdefassign.pyx
tests/run/cmp.pyx
tests/run/extmember.pyx
tests/run/fmod.pyx
tests/run/future_division.pyx
tests/run/future_unicode_literals.pyx
tests/run/int_literals.pyx
tests/run/iteratorexception.pyx
tests/run/literal_lists.pyx
tests/run/longlongindex.pyx
tests/run/pure.pyx
tests/run/slice_charptr.pyx
tests/run/struct_conversion.pyx
tests/run/temps_corner1.pyx
tests/run/unsigned.pyx

index 6131d896be4ca1c0f8d00cd6a23d47ce37a6b0fd..355fa08113c174fb366bfc8530aeb178780b26fc 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> A().test(3)
     9
 """
index ca6fd0729c71b9fb68b4c6a4695853132474b53e..30e86c3f668599f0f5a5c0899245b3b283afe183 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
 >>> test1()
 2
 >>> test2()
index e1751fa1a9ea1ded6ce11796357fa02fbbbeb047..cd03ce59d4dc92844fa9cfa9e3cb0b6a05e85d9b 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> a = A()
     >>> a.foo()
     (True, 'yo')
index eba76a9667b95ba75d6951a0cbe1dacb17279a69..bb0ebab81dc87cabf4cfe8ed13a839c0984c97ba 100644 (file)
@@ -1,5 +1,4 @@
-
-__doc__ = """
+__doc__ = u"""
    >>> test(1, 2)
    4 1 2 2 0 7 8
 """
index 44cf6c670902bcbd79edb8a9b994dfbeba5aec3d..7cb9c05edbf0fd0fe9bc137ece93a635d698751b 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> single_py(1, 2)
     True
     >>> single_py(2, 1)
index c1b958a62777762d424a9c2dcbd03dc5762c797f..1bd9d018d162ae03e5e7ff2f4a1189886e8533e5 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> s = Spam()
     >>> s.e = s
     >>> s.e = 1
index 0bbd76b8a1d47c9f372585f2bda3758a3829350d..29158aba8d6b2c9bba077c17f04c651d7988a086 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> fmod(7, 1.25)
     0.75
 """
index 5f78dafcffdc3b20c847856f6bc99f778d565a9b..cfb948f978fa1777396292a7633eadc07c6f73bf 100644 (file)
@@ -1,6 +1,6 @@
 from __future__ import division
 
-__doc__ = """
+__doc__ = u"""
 >>> from future_division import doit
 >>> doit(1,2)
 (0.5, 0)
index 4e932cbff278bb7d24cb6d2d05f15a91dcdbe43f..ada73368682ea22a8fe744be35a7b641c32ac9b5 100644 (file)
@@ -2,14 +2,14 @@ from __future__ import unicode_literals
 
 import sys
 if sys.version_info[0] >= 3:
-    __doc__ = """
+    __doc__ = u"""
     >>> u == 'test'
     True
     >>> isinstance(u, str)
     True
 """
 else:
-    __doc__ = """
+    __doc__ = u"""
     >>> u == u'test'
     True
     >>> isinstance(u, unicode)
index 44fec85871db1222a4206a09e4ca62479ea41644..bacc072241337aceb49329df576f7df466d9c1cd 100644 (file)
@@ -1,10 +1,15 @@
-__doc__ = """
+__doc__ = u"""
     >>> c_longs()
     (1, 1L, -1L, 18446744073709551615L)
     >>> py_longs()
     (1, 1L, 100000000000000000000000000000000L, -100000000000000000000000000000000L)
 """
 
+import sys
+
+if sys.version_info[0] >= 3:
+    __doc__ = __doc__.replace(u'L', u'')
+
 def c_longs():
     cdef long a = 1L
     cdef unsigned long ua = 1UL
index 98f9806fd2c4c2884c23b862d637ebe26bfde45e..f2726a10e637b6afdeef989c8b3de4d826242bd0 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> f()
 """
 
index 0c9353563d14234818d252dc9198144c35928200..5925c69e58b1eeeb6776d2fa3722afb0c0cbcb39 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> test_ints(100)
     (100, 100, 100)
     >>> test_chars("yo")
index 87dcfe5e8f3e354d1cfb8b118c45b6d61c94cfbe..22ec638ebfde93872ea79c4db2b6dc52536fc038 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> D = set_longlong(2**40, 2**50, 2, "yelp")
     >>> D[2**40]
     'yelp'
index 44b299613e03f728bc56f39a5b54c76f8bacae33..38910a8eb82de3010a5359f495a7a5f8efc37b9f 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
 >>> test_sizeof()
 True
 True
index 5f7369c72d766cef1fdead71fab0332b28b5aa15..b7fcef0f817488957473289361d5f8fb390e59cc 100644 (file)
@@ -1,7 +1,7 @@
-__doc__ = """
-    >>> do_slice("abcdef", 2, 3)
+__doc__ = u"""
+    >>> do_slice("abcdef".encode(u"ASCII"), 2, 3)
     ('c', 'cdef', 'ab', 'abcdef')
-    >>> do_slice("abcdef", 0, 5)
+    >>> do_slice("abcdef".encode(u"ASCII"), 0, 5)
     ('abcde', 'abcdef', '', 'abcdef')
 """
 
index 39921d0fe01d20a5811b40d8b5ebca6099f049e8..2234b0e46615c1cf26c2af9fd67ac43a302fbaad 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> test_constructor(1,2,255)
     {'y': 2.0, 'x': 1.0, 'color': 255}
     >>> test_constructor(1,None,255)
index bade962903b897d405e084ab5a0db058c01dc1cd..5d454ddc9d5cab895b97b92b1e0bf3d02e6cbd18 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
    >>> B().coeffs_bitsize()
    [2]
 """
index 86d2cda7a7ae72657f3fb2183992b985a194ba9c..8fdb2c3ff3553769ef33733b3bce404946fff8ce 100644 (file)
@@ -1,4 +1,4 @@
-__doc__ = """
+__doc__ = u"""
     >>> test_signed()
     3 <type 'int'>
     9 <type 'long'>