def my_sum(a,b):
a += 1
b +=2
return a+b
class TestSum2(unittest.TestCase):
@parameterized.parameterized.expand([(1,1,5),(2,1,6),(0,0,3)])
def test_001(self,x,y,z):
number = my_sum(x,y)
self.assertEqual(number,z)
2024-01-20 21:00:52
def my_sum(a,b):
a += 1
b +=2
return a+b
class TestSum2(unittest.TestCase):
@parameterized.parameterized.expand([(1,1,5),(2,1,6),(0,0,3)])
def test_001(self,x,y,z):
number = my_sum(x,y)
self.assertEqual(number,z)
下一篇:自动化测试--Unittest