Commit 3f8f6830 authored by Stefan Behnel's avatar Stefan Behnel

Py3 test case fix

parent 72fa7588
...@@ -23,14 +23,17 @@ __doc__ = u""" ...@@ -23,14 +23,17 @@ __doc__ = u"""
""" """
import sys import sys
if sys.version_info[0] < 3: IS_PY3 = sys.version_info[0] >= 3
__doc__ = __doc__.replace(" b'", " '") if IS_PY3:
__doc__ = __doc__.replace(u" u'", u" '")
else: else:
__doc__ = __doc__.replace(" u'", " '") __doc__ = __doc__.replace(u" b'", u" '")
def test_str(n): def test_str(n):
return "abcd"[n] if IS_PY3:
return bytes(["abcd"[n]])
else:
return "abcd"[n]
def test_unicode_ascii(n): def test_unicode_ascii(n):
return u"abcd"[n] return u"abcd"[n]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment