Convert python test scripts to be Python 2 and 3 compatible

Unicode testing
This commit is contained in:
William S Fulton 2020-08-15 00:09:31 +01:00
commit 66df0bd224
6 changed files with 28 additions and 30 deletions

View file

@ -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))