Fix python 3 test failures caused by unicode string.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
92828cb4ce
commit
fda502e0a1
tensorflow/python/kernel_tests
@ -49,7 +49,8 @@ class StringLowerOpTest(test.TestCase):
|
||||
with self.cached_session() as sess:
|
||||
output = string_ops.string_lower(strings, encoding='utf-8')
|
||||
output = self.evaluate(output)
|
||||
self.assertAllEqual(output, [[b"óósschloë"]]),
|
||||
# output: "óósschloë"
|
||||
self.assertAllEqual(output, [[b"\xc3\xb3\xc3\xb3sschlo\xc3\xab"]])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -49,7 +49,8 @@ class StringUpperOpTest(test.TestCase):
|
||||
with self.cached_session() as sess:
|
||||
output = string_ops.string_upper(strings, encoding='utf-8')
|
||||
output = self.evaluate(output)
|
||||
self.assertAllEqual(output, [[b"ÓÓSSCHLOË"]]),
|
||||
# output: "ÓÓSSCHLOË"
|
||||
self.assertAllEqual(output, [[b"\xc3\x93\xc3\x93SSCHLO\xc3\x8b"]])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user