pytest为经常使用fixture添加autouse选项

@pytest.fixture(autouse=True)
def some():
    return 1

def test_someA():
    assert True

def test_someB():
    assert True

相关文章
相关标签/搜索