当前位置:网站首页>Pytest (3) parameterize
Pytest (3) parameterize
2022-07-02 06:33:00 【bthtth】
import pytest
datas_list = [(" Li Hua ",24),(" Zhang San ",43))
@pytest.mark.parametrize("data",datas_list)
def test_print(data):
print(" I am a {0}, This year, {1} year ".format(data[0],data[1]))
parametrize(" Parameter name ", Organize a list of data )
# Parameter name , It is used to receive the data that each group needs to transmit
# Organize a list of data , No need to add *
# Parameter name Want to be with The formal parameter names of use case functions are the same
# Compare ddt, Parameter name is not required , The list needs to add *
@ddt
@data(*datas_list)
def test_print(data)
print(" I am a {0}, This year, {1} year ".format(data[0],data[1]))边栏推荐
猜你喜欢
随机推荐
数据科学【九】:SVD(二)
Hydration failed because the initial UI does not match what was rendered on the server.问题原因之一
CUDA中的Warp Shuffle
JS modification element attribute flipping commonly used in selenium's Web Automation
Tensorrt command line program
Warp matrix functions in CUDA
Render minecraft scenes into real scenes using NVIDIA GPU
FE - 微信小程序 - 蓝牙 BLE 开发调研与使用
阿里云MFA绑定Chrome浏览器
Pbootcms collection and warehousing tutorial quick collection release
Shardingsphere JDBC
Selenium+msedgedriver+edge browser installation driver pit
Golang--map扩容机制(含源码)
CUDA用户对象
奇葩pip install
Amazon AWS data Lake Work Pit 1
RestTemplate请求时设置请求头,请求参数,请求体。
AWD学习
底层机制Mvcc
ctf三计









