Commit cf9b9b59 authored by Stefan Behnel's avatar Stefan Behnel

more test fixes

parent e990db84
......@@ -23,7 +23,7 @@ None
class A:
def append(self, x):
print "appending"
print u"appending"
return x
class B(list):
......@@ -38,6 +38,6 @@ def test_append(L):
try:
print L.append(5,6)
except TypeError:
print "got error"
print u"got error"
return L
......@@ -8,5 +8,5 @@ __doc__ = u"""
class Bicycle:
def fall_off(self, how_hard = "extremely"):
print "Falling off", how_hard, "hard"
def fall_off(self, how_hard = u"extremely"):
print u"Falling off", how_hard, u"hard"
......@@ -14,6 +14,6 @@ class CoconutCarrier:
if name is not None:
print u"This swallow is called", name
if airspeed is not None:
print u"This swallow is flying at", airspeed, "furlongs per fortnight"
print u"This swallow is flying at", airspeed, u"furlongs per fortnight"
if coconuts is not None:
print u"This swallow is carrying", coconuts, "coconuts"
print u"This swallow is carrying", coconuts, u"coconuts"
__doc__ = u"""
>>> c = C()
>>> print(c.x)
foo
>>> c.x
b'foo'
"""
import sys
if sys.version_info[0] < 3:
__doc__ = __doc__.replace(u" b'", u" '")
class C:
x = "foo"
......@@ -24,7 +24,7 @@ else:
__doc__ = __doc__.replace(u" b'", u" '")
s = str
z = str('test', **encoding)
z = str('test')
def c(string):
return str(string, **encoding)
......
......@@ -21,7 +21,7 @@ if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
u = unicode
z = unicode('test')
z = unicode(u'test')
def c(string):
return unicode(string)
......
......@@ -2,7 +2,7 @@
__doc__ = r"""
>>> sa
'abc'
b'abc'
>>> ua
u'abc'
>>> b
......@@ -39,8 +39,6 @@ __doc__ = r"""
>>> len(null)
1
""".decode(u"ASCII") + u"""
>>> sa == 'abc'
True
>>> ua == u'abc'
True
>>> b == u'123'
......@@ -66,6 +64,8 @@ __doc__ = r"""
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
else:
__doc__ = __doc__.replace(u" b'", u" '")
sa = 'abc'
ua = u'abc'
......
......@@ -8,7 +8,7 @@
__doc__ = r"""
>>> sa
'abc'
b'abc'
>>> ua
u'abc'
>>> b
......@@ -45,8 +45,6 @@ __doc__ = r"""
>>> len(null)
1
""".decode(u"ASCII") + u"""
>>> sa == 'abc'
True
>>> ua == u'abc'
True
>>> b == u'123'
......@@ -72,6 +70,8 @@ __doc__ = r"""
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
else:
__doc__ = __doc__.replace(u" b'", u" '")
sa = 'abc'
ua = u'abc'
......
......@@ -2,7 +2,7 @@
__doc__ = r"""
>>> sa
'abc'
b'abc'
>>> ua
u'abc'
>>> b
......@@ -39,8 +39,6 @@ __doc__ = r"""
>>> len(null)
1
""".decode(u"ASCII") + u"""
>>> sa == 'abc'
True
>>> ua == u'abc'
True
>>> b == u'123'
......@@ -66,6 +64,8 @@ __doc__ = r"""
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u" u'", u" '")
else:
__doc__ = __doc__.replace(u" b'", u" '")
sa = '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