summaryrefslogtreecommitdiffstats
path: root/BaseTools/Tests/CheckUnicodeSourceFiles.py
diff options
context:
space:
mode:
authorZhijux Fan <zhijux.fan@intel.com>2018-12-16 14:56:04 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-02-01 11:09:19 +0800
commitfe906312983fce0074d534c03844c035c086d57d (patch)
tree1c594a9abae41e43c54ca8494bb77cf62b4a134b /BaseTools/Tests/CheckUnicodeSourceFiles.py
parent174a9d3cc8f74f7a731ac5f16ce6864c8eb359ec (diff)
downloadedk2-fe906312983fce0074d534c03844c035c086d57d.tar.gz
edk2-fe906312983fce0074d534c03844c035c086d57d.tar.bz2
edk2-fe906312983fce0074d534c03844c035c086d57d.zip
BaseTools: update Test scripts support python3
update Test scripts support python2 and python3 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@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)