"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>
import shutil\r
import subprocess\r
import sys\r
-import types\r
import unittest\r
\r
TestsDir = os.path.realpath(os.path.split(sys.argv[0])[0])\r
def MakeTheTestSuite(localItems):\r
tests = []\r
for name, item in localItems.iteritems():\r
- if isinstance(item, types.TypeType):\r
+ if isinstance(item, type):\r
if issubclass(item, unittest.TestCase):\r
tests.append(unittest.TestLoader().loadTestsFromTestCase(item))\r
elif issubclass(item, unittest.TestSuite):\r