我定义了一个固定装置,如:
@pytest.fixture
def mock_yield_data(self):
for data in [
{
1: 2, 2: 3
},
{
2: 4, 4: 5
},
]:
yield data
以及一种测试方法,如:
^{pr2}$断言成功,但teardown
抛出yield_fixture function has more than one 'yield':
。在
==================================================================================================== ERRORS ====================================================================================================
_________________________________________________________________________ ERROR at teardown of TestClass.test_fixture _________________________________________________________________________
yield_fixture function has more than one 'yield':
在pytest.yieldfixture文档的最后一节中:
内存占用这么小,您应该只返回整个内容:
相关问题 更多 >
编程相关推荐