其他分享
首页 > 其他分享> > 判断是否是类,或者子类

判断是否是类,或者子类

作者:互联网

 if isinstance(test, type) and issubclass(test,(case.TestCase, TestSuite)):
    raise TypeError("TestCases and TestSuites must be instantiated "
                            "before passing them to addTest()")

标签:case,TestSuite,判断,子类,是否是,TestCase,issubclass,test
来源: https://www.cnblogs.com/kxtomato/p/16504116.html