如何将参数发送到pytest_runtest_call

时间:2018-08-23 17:23:51

标签: python pytest

我的conftest.py文件中包含以下内容

 def pytest_collection_modifyitems(config,items):
   with open("C:\Users\xyz\mno\cli_automation\test_configuration\project\test_command.yml", 'r') as stream:
       data_loaded = yaml.load(stream)
       for i in items:
           if i.name == data_loaded.get("test_name"):
               i.add_marker(data_loaded.get("test_type"))
               pytest_runtest_call(i)

我无法将已加载的Yaml配置详细信息发送到pytest_runtest_call。我该如何实现?

0 个答案:

没有答案