- 博客(2)
- 收藏
- 关注
原创 unittest.skip跳过测试和unittest.expectedFailure预期失败
unittest.skip跳过测试方法python unittest测试框架从python2.7开始支持设置跳过指定的测试方法或是跳过满足某种条件的测试用例。@unittest.skip(reason): skip(reason)装饰器:无条件跳过装饰的测试,并说明跳过测试的原因。@unittest.skipIf(reason): skipIf(condition,reason)装饰...
2019-11-28 18:45:10 1556 2
原创 unittest框架入门之TestCase类用法
def add(a,b): return (a+b)def subtract(a,b): return (a-b)def multiply(a,b): return (a*b)def divide(a,b): return (a/b)1、创建文件demo27.py2、创建文件unittestdemo27.pyimport unittestfro...
2019-11-28 18:32:14 1226
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人