unittest
shengshengman12
这个作者很懒,什么都没留下…
展开
-
unittest.TestLoader()类的几种寻找testcase的方法的使用
unittest.TestLoader()提供了创建test suite的几种方法:TestLoader().loadTestsFromTestCase(testCaseClass)TestLoader().loadTestsFromModule(module, pattern=None)TestLoader().loadTestsFromName(name, module=None)TestLoader().loadTestsFromNames(name, module=None)TestLoa转载 2020-07-21 16:42:32 · 973 阅读 · 0 评论 -
unittest skip学习笔记
1.skip的几种用法1.1 @unittest.skip(reason)reason是跳转的原因,强制跳过1.2 @unittest.skipIf(condition,reason)有条件的跳转,如果condition为真,则跳过1.3 @unittest.skipUnless(condition,reason)有条件的跳转,如果condition为假,则跳过1.4 @unittest.expectedFailure如果test失败了,这个test不计入失败的case数目2.实例2.1原创 2020-07-21 16:35:32 · 332 阅读 · 0 评论