测试结果的HTML报告(由pytest-html生成)不包含来自fixture finalizer的日志消息。我尝试使用pytest-html和pytest-catchlog来获得很好的逻辑HTML测试报告,例如:测试用例设置日志消息(从Pytest Function Fixture发送)测试用例关闭日志消息(从Pytest Fu
我想在conftest.py中设置一个固定设备,并与我的所有测试共享它。但是,在下面的最小示例中运行pytest时,我会遇到以下错误:Fixture "pytest_runtest_setup" called directlyimport os
def pytest_runtest_setup():
print(