Pytest fixture fixture 相比于unittest中的teardown和setup更加灵活 pytest setup / teardown 运行结果: pytest allure生成测试报告 根据目录,运行allure 这时候在项目中的report文件夹中生成一些文件,但是不能直接打开,需要在当前目录下运行后生成网页版测试报告