标签:rac python36 image type error: work lin unittest pre
Traceback (most recent call last):
File "E:/2017work/2017年12月/Pytest/UnittestTest/TestTest.py", line 5, in <module>
suite1=unittest.TestLoader().loadTestsFromTestCase(UnittestTest.MyTest)
File "D:\Python36\lib\unittest\loader.py", line 86, in loadTestsFromTestCase
if issubclass(testCaseClass, suite.TestSuite):
TypeError: issubclass() arg 1 must be a class
解决办法:
造成该问题的原因是unitestTest.MyTest只是定位到了 MyTest这个文件,并没有定位到MyTest的这个类,正确的到类应该为:
UnittestTest.MyTest.MyTest
Python. 报错: TypeError: issubclass() arg 1 must be a class
标签:rac python36 image type error: work lin unittest pre
原文地址:https://www.cnblogs.com/lch-1-lucky/p/9376411.html