pytest笔记
1,基础格式a,python文件需要以“test_”为开头,或者以“_test”为结尾。b,创建类时,需要以“Test”为开头c,定义函数时,需要以“test”为开头2,参数化用例@pytest.mark.parametrize( "a, b, expect, title", yaml.safe_load(open("./datas/add_data.yaml",encoding='utf-8')))a, b, expect, title为测试用例中可以使用的参数,
原创
2021-10-31 23:19:26 ·
74 阅读 ·
0 评论