pytest使用多个fixture

@pytest.fixture()
def some_A():
    return 1

@pytest.fixture()
def some_B(some_A):
    return some_A+1

@pytest.fixture()
def some_C(some_A,some_B):
    return some_A+some_B

def test_some(some_C):
    assert some_C==3

 

posted @ 2019-08-21 17:54  OTAKU_nicole  阅读(536)  评论(0编辑  收藏  举报