pytest为常用fixture添加autouse选项

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

def test_someA():
    assert True

def test_someB():
    assert True

原文地址:https://www.cnblogs.com/nicole-zhang/p/11390254.html