Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在多个文件中运行一系列测试用例,但我想在整个运行过程中只运行一次 prereq 和清理,请告诉我有没有办法做到这一点?
py.test -> 会话范围的固定装置及其最终确定应该对您有所帮助
您可以使用 conftest.py 对您的夹具进行编码。