pytest.mark.parametrize传递可变数据问题
class Test_case(object):@pytest.mark.parametrize('testcasedatadict', thistestcasedata()['testcasedata'])
def test_interface(self,testcasedatadict):
print(testcasedatadict)
pytest.main(["-s","testcasedata\\testcase_exe_fun.py::Test_case::test_interface"])
pytest.main(["-s","testcasedata\\testcase_exe_fun.py::Test_case::test_interface"])
我在不关闭的进程情况下执行pytest.main改变了thistestcasedata()['testcasedata']值,然后第二次执行pytest.main还是使用了初始的thistestcasedata()['testcasedata']值,怎么多次pytest.main, @pytest.mark.parametrize('testcasedatadict', thistestcasedata()['testcasedata'])使用不同值啊
PS:进程未杀死的情况多次pytest.main https://www.cnblogs.com/fyly/p/11223287.html 参考下这个 参考下这个https://www.cnblogs.com/fyly/p/11223287.html https://www.cnblogs.com/fyly/p/11223287.html 参考下这篇文章 参考这个实例讲解的链接看下:https://www.cnblogs.com/hghua/p/13266380.html 看一下楼上的实例
页:
[1]