Python 如何向pytest\u runtest\u调用发送参数

Python 如何向pytest\u runtest\u调用发送参数,python,pytest,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:

我的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\u runtest\u调用。如何实现它?

pytest\u runtest\u call
不允许您直接调用它。请给出一个要参数化的测试示例。在上面的示例中,我调用“pytest\u runtest\u call”时,必须在调用测试时将加载的yaml作为参数发送。