Commit 84827de7 authored by Stefan Behnel's avatar Stefan Behnel

docstrings can't have u'abc' literals in Py3

parent 5c74d3d8
...@@ -19,7 +19,7 @@ __doc__ = r""" ...@@ -19,7 +19,7 @@ __doc__ = r"""
u'S\xf8k ik\xfc\xd6\xe4abc' u'S\xf8k ik\xfc\xd6\xe4abc'
>>> null >>> null
u'\x00' u'\x00'
""" + """ """.decode("ASCII") + """
>>> len(sa) >>> len(sa)
3 3
>>> len(ua) >>> len(ua)
...@@ -38,7 +38,7 @@ __doc__ = r""" ...@@ -38,7 +38,7 @@ __doc__ = r"""
12 12
>>> len(null) >>> len(null)
1 1
""" + u""" """.decode("ASCII") + u"""
>>> sa == 'abc' >>> sa == 'abc'
True True
>>> ua == u'abc' >>> ua == u'abc'
...@@ -63,6 +63,10 @@ __doc__ = r""" ...@@ -63,6 +63,10 @@ __doc__ = r"""
True True
""" """
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
sa = 'abc' sa = 'abc'
ua = u'abc' ua = u'abc'
......
...@@ -25,7 +25,7 @@ __doc__ = r""" ...@@ -25,7 +25,7 @@ __doc__ = r"""
u'S\xf8k ik\xfc\xd6\xe4abc' u'S\xf8k ik\xfc\xd6\xe4abc'
>>> null >>> null
u'\x00' u'\x00'
""" + """ """.decode("ASCII") + """
>>> len(sa) >>> len(sa)
3 3
>>> len(ua) >>> len(ua)
...@@ -44,7 +44,7 @@ __doc__ = r""" ...@@ -44,7 +44,7 @@ __doc__ = r"""
12 12
>>> len(null) >>> len(null)
1 1
""" + u""" """.decode("ASCII") + u"""
>>> sa == 'abc' >>> sa == 'abc'
True True
>>> ua == u'abc' >>> ua == u'abc'
...@@ -69,6 +69,10 @@ __doc__ = r""" ...@@ -69,6 +69,10 @@ __doc__ = r"""
True True
""" """
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
sa = 'abc' sa = 'abc'
ua = u'abc' ua = u'abc'
......
...@@ -19,7 +19,7 @@ __doc__ = r""" ...@@ -19,7 +19,7 @@ __doc__ = r"""
u'S\xf8k ik\xfc\xd6\xe4abc' u'S\xf8k ik\xfc\xd6\xe4abc'
>>> null >>> null
u'\x00' u'\x00'
""" + """ """.decode("ASCII") + """
>>> len(sa) >>> len(sa)
3 3
>>> len(ua) >>> len(ua)
...@@ -38,7 +38,7 @@ __doc__ = r""" ...@@ -38,7 +38,7 @@ __doc__ = r"""
12 12
>>> len(null) >>> len(null)
1 1
""" + u""" """.decode("ASCII") + u"""
>>> sa == 'abc' >>> sa == 'abc'
True True
>>> ua == u'abc' >>> ua == u'abc'
...@@ -63,6 +63,10 @@ __doc__ = r""" ...@@ -63,6 +63,10 @@ __doc__ = r"""
True True
""" """
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
sa = 'abc' sa = 'abc'
ua = u'abc' ua = u'abc'
......
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