Python pytest 中的 fixture 是不是只能作用于以 test 开头如 test_01 这种测试函数?

takaの · 2019年07月04日 · 最后由 皆非 回复于 2019年07月06日 · 1565 次阅读

pytest 中的 fixture 是不是只能作用于以 test 开头如 test_01 这种测试函数?

共收到 2 条回复 时间 点赞

可以用在 class Test_ 里

[pytest]
python_files=test_* *_test check_*
python_functions = test_* *_test check_*

修改后,fixture 是否支持,没试过。
https://www.cnblogs.com/linuxchao/p/linuxchao-pytest-configfile.html

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册