pytest框架的一些补充

1.关于pytest.fixture

@pytest.fixture(scope="module", autouse=True)

其中autouse=True,作用域默认是function,加了scope=module之后作用域就是module

 

运行结果:

 

2.conftest.py文件中是不能写class的 !注意⚠️

 

posted @ 2020-05-01 15:33  zhaikunkun  阅读(193)  评论(0)    收藏  举报