Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.8.5版本,conftest;自动导入fixtures下面的模块,函数没有生效 #4

Closed
zhangwk02 opened this issue Jun 14, 2021 · 2 comments

Comments

@zhangwk02
Copy link
Contributor

zhangwk02 commented Jun 14, 2021

这段貌似没有生效
image

@dongfanger
Copy link
Owner

def test(env_vars):
    print(env_vars.domain)

pytest 的 fixture 必须作为函数参数才能被引用。

@zhangwk02
Copy link
Contributor Author

还是引用不上
image

单独把 env_vars 函数,放在别的fixture 模块下,可以调用;放在fixture_env_vars.py 下面就不行
@dongfanger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants