BaseTools: update Test scripts support python3

update Test scripts support python3

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yunhua Feng
2018-10-12 09:19:03 +08:00
committed by Yonghong Zhu
parent 22c4de1ac8
commit ea787b6b55
3 changed files with 12 additions and 10 deletions

View File

@ -110,7 +110,7 @@ class Tests(TestTools.BaseToolsTest):
# This test makes sure that BaseTools rejects these characters
# if seen in a .uni file.
#
data = codecs.BOM_UTF16_LE + '//\x01\xd8 '
data = codecs.BOM_UTF16_LE + b'//\x01\xd8 '
self.CheckFile(encoding=None, shouldPass=False, string=data)
@ -161,7 +161,7 @@ class Tests(TestTools.BaseToolsTest):
# This test makes sure that BaseTools rejects these characters
# if seen in a .uni file.
#
data = '\xed\xa0\x81'
data = b'\xed\xa0\x81'
self.CheckFile(encoding=None, shouldPass=False, string=data)
@ -170,7 +170,7 @@ class Tests(TestTools.BaseToolsTest):
# Same test as testSurrogatePairUnicodeCharInUtf8File, but add
# the UTF-8 BOM
#
data = codecs.BOM_UTF8 + '\xed\xa0\x81'
data = codecs.BOM_UTF8 + b'\xed\xa0\x81'
self.CheckFile(encoding=None, shouldPass=False, string=data)