ddt 依赖宝:pip install ddt from ddt import ddt,data data = [1,2,3] class Test: @data(*data) def test_ddt(self,data): print(data)