How to fix "XXX not found" error when running pytest test cases
一、问题:
- 以下是在conftest.py使用了fixture,执行测试时的报错信息(Let me rephrase the statement for better clarity and correct any errors:When conftest.py utilizes fixtures to execute tests, here is what occurs.)
二、原因:
- pytest版本升级到7.4.0版本之后,conftest.py文件搜索机制发生改变,默认从测试用例的目录去找对应的文件(After upgrading pytest to version 7.4.0 or later, the conftest.py file search mechanism was changed. By default, the corresponding file is now found in the test case directory.)
https://docs.pytest.org/en/st