当前位置:网站首页>pytest接口自动化测试框架 | 使用函数返回值的形式传入参数值
pytest接口自动化测试框架 | 使用函数返回值的形式传入参数值
2022-08-01 07:12:00 【COCOgsta】
视频来源:B站《冒死上传!pytest接口自动化测试框架(基础理论到项目实战及二次开发)教学视频【软件测试】》
一边学习一边整理老师的课程内容及试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:pytest接口自动化测试框架 | 汇总_COCOgsta的博客-CSDN博客
import pytest
def return_data():
return [(1,2),(3,4)]
# 使用函数返回值的形式传入参数值
@pytest.mark.parametrize("a,b", return_data())
def test_01(a,b):
print("\n" + "a=%d, b=%d" % (a,b))
if __name__ == '__main__':
pytest.main(['-s', 'test_return.py'])
边栏推荐
- Matlab simulink particle swarm optimization fuzzy pid control motor pump
- 好的plm软件有哪些?plm软件排行榜
- 从底层结构开始学习FPGA(6)----分布式RAM(DRAM,Distributed RAM)
- my creative day
- 研发过程中的文档管理与工具
- 搜索框字符自动补全
- C语言学习概览(三)
- Guest brush SQL - 2
- 配置我的kitty
- I have three degrees, and I have five faces. I was "confessed" by the interviewer, and I got an offer of 33*15.
猜你喜欢
随机推荐
2022杭电多校第二场1011 DOS Card(线段树)
The BP neural network based on MATLAB voice characteristic signal classification
Vim扩展内容
Offer刷题——1
并发编程13-JUC之CountDownLatch
curl (7) Failed connect to localhost8080; Connection refused
Offer brush questions - 1
C语言学习概览(一)
POJ1251丛林之路题解
最小生成树
【一句话攻略】彻底理解JS中的回调(Callback)函数
Golang: go static file processing
Create, modify and delete tables
Leetcode第 304 场周赛
NIO programming
C语言学习概览(三)
旋度(7)连接失败localhost8080;连接拒绝了
【ASWC Arxml结构分解】-7-Explicit(显式)和Implicit(隐式) Sender-Receiver communication描述差异
MySQL row locks and gap locks
Generate pictures based on the content of the specified area and share them with a summary