标签:imp unittest 数值 file 示例 def import ddd bsp
import unittest from ddt import ddt,data,file_data,unpack @ddt class TestDDT(unittest.TestCase): listb=[] listb.append((1,1)) listb.append((2,1)) listb.append((3,1)) listb.append((4,1)) listb.append((5,1)) listb.append((6,1)) listb.append((7,1)) listb.append((8,1)) listb.append((9,1)) listb.append((11,1)) listb.append((12,1)) listb.append((13,1)) listb.append((14,1)) @data(*listb) @unpack def test_addd(self,a,b): c= a+b print(a) if __name__ == "__main__": unittest.main()
标签:imp unittest 数值 file 示例 def import ddd bsp
原文地址:https://www.cnblogs.com/testway/p/9831355.html