summaryrefslogtreecommitdiffstats
path: root/BaseTools/Tests/CheckUnicodeSourceFiles.py
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-10-12 09:19:03 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 09:57:19 +0800
commitea787b6b55499e8f931201f8f49daaaeb2e4409f (patch)
treee0ea0ca11bf8f7c1b6ef98f8d2983e7038adb875 /BaseTools/Tests/CheckUnicodeSourceFiles.py
parent22c4de1ac8f1fc72e8d72af6a315e584490a44b0 (diff)
downloadedk2-ea787b6b55499e8f931201f8f49daaaeb2e4409f.tar.gz
edk2-ea787b6b55499e8f931201f8f49daaaeb2e4409f.tar.bz2
edk2-ea787b6b55499e8f931201f8f49daaaeb2e4409f.zip
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>
Diffstat (limited to 'BaseTools/Tests/CheckUnicodeSourceFiles.py')
-rw-r--r--BaseTools/Tests/CheckUnicodeSourceFiles.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Tests/CheckUnicodeSourceFiles.py b/BaseTools/Tests/CheckUnicodeSourceFiles.py
index 6ae62f180a..c76b2bc20e 100644
--- a/BaseTools/Tests/CheckUnicodeSourceFiles.py
+++ b/BaseTools/Tests/CheckUnicodeSourceFiles.py
@@ -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)