mirror of https://github.com/acidanthera/audk.git
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 <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
92beb1e4c7
commit
aaa4c651bf
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue