随笔分类 -  单元测试

单元测试-unittest模块
摘要:1、简单的一个实例 1 import unittest 2 3 def calc(a,b): 4 return a+b 5 class MyTest(unittest.TestCase): 6 def testa(self):#函数名前面加上test 7 res = calc(1,2) 8 self 阅读全文

posted @ 2019-04-17 14:08 羽竹 阅读(179) 评论(0) 推荐(0)