From aaa4c651bf5ba5fce14e9fe8c2c12687886f745d Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Mon, 25 Jun 2018 18:31:31 +0800 Subject: [PATCH] BaseTools: Remove types.TypeType "types.TypeType" is now an alias of the built-in "type" and is not compatible with python 3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- BaseTools/Tests/TestTools.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BaseTools/Tests/TestTools.py b/BaseTools/Tests/TestTools.py index be7b4ad428..20a4ea28aa 100644 --- a/BaseTools/Tests/TestTools.py +++ b/BaseTools/Tests/TestTools.py @@ -23,7 +23,6 @@ import random import shutil import subprocess import sys -import types import unittest TestsDir = os.path.realpath(os.path.split(sys.argv[0])[0]) @@ -42,7 +41,7 @@ if PythonSourceDir not in sys.path: def MakeTheTestSuite(localItems): tests = [] for name, item in localItems.iteritems(): - if isinstance(item, types.TypeType): + if isinstance(item, type): if issubclass(item, unittest.TestCase): tests.append(unittest.TestLoader().loadTestsFromTestCase(item)) elif issubclass(item, unittest.TestSuite): -- 2.39.2