Convert python test scripts to be Python 2 and 3 compatible
Unicode testing
This commit is contained in:
parent
36bb54f01d
commit
66df0bd224
6 changed files with 28 additions and 30 deletions
|
|
@ -7,20 +7,20 @@ class B(A):
|
|||
A.__init__(self, string)
|
||||
|
||||
def get_first(self):
|
||||
return A.get_first(self) + u" world!"
|
||||
return A.get_first(self) + " world!"
|
||||
|
||||
def process_text(self, s):
|
||||
self.smem = s
|
||||
|
||||
|
||||
b = B(u"hello")
|
||||
b = B("hello")
|
||||
|
||||
b.get(0)
|
||||
if b.get_first() != u"hello world!":
|
||||
if b.get_first() != "hello world!":
|
||||
raise RuntimeError("b.get_first(): {}".format(b.get_first()))
|
||||
|
||||
|
||||
b.call_process_func()
|
||||
|
||||
if b.smem != u"hello":
|
||||
if b.smem != "hello":
|
||||
raise RuntimeError("smem: {}".format(smem))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue