projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72fa758
)
Py3 test case fix
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 30 Dec 2008 12:58:12 +0000
(13:58 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 30 Dec 2008 12:58:12 +0000
(13:58 +0100)
tests/run/literalslice.pyx
patch
|
blob
|
history
diff --git
a/tests/run/literalslice.pyx
b/tests/run/literalslice.pyx
index 6b1ede72d8c82a2e7da712a292e43c6ae7b6af3d..d7102b6caa6e34f5614f91980a96bfaa1262caa8 100644
(file)
--- a/
tests/run/literalslice.pyx
+++ b/
tests/run/literalslice.pyx
@@
-23,14
+23,17
@@
__doc__ = u"""
"""
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]
+ if IS_PY3:
+ return bytes(["abcd"[n]])
+ else:
+ return "abcd"[n]
def test_unicode_ascii(n):
return u"abcd"[n]