‘’’
Created on 2019年11月1日

@author: lingh
‘’’
import unittest
from ddt import ddt,data,unpack
@ddt
class aTestClass(unittest.TestCase):
@data({‘first’:1,‘second’:3,‘third’:2},
{‘first’:4,‘second’:6,‘third’:5})
@unpack
def test_dicts(self,first,second,third):
print(first,third,second)

if name==‘main’:
unittest.main() unittest写用例之ddt(data-字典形式)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-12
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
相关资源
相似解决方案