简体   繁体   English

如何在 cmd.exe 中命令变量值从 conftest.py 到 pytest

[英]how to command variables values from conftest.py to pytest in cmd.exe

in bash "env" and in terminalX "env -S" work, in cmd "env" is not an internal or external command, executable program or batch file.在 bash “env” 和 terminalX “env -S” 工作中,在 cmd “env” 不是内部或外部命令、可执行程序或批处理文件。

for example:例如:

on Linux:(. venv) ~ rootdir> $ env "browser.config.browser_name = firefox" pytest tests / file.py在 Linux:(.venv) ~ rootdir> $ env "browser.config.browser_name = firefox" pytest 测试/file.py

on MacOS:(. venv) ~ / rootdir> env -S "browser.config.browser_name = firefox" pytest tests / file.py在 MacOS 上:(.venv) ~ / rootdir> env -S "browser.config.browser_name = firefox" pytest 测试 / file.py

but on Win: (. venv) ~/ rootdir>... ?但是在 Win: (.venv) ~/rootdir>... 上 ... "browser.config.browser_name = firefox" pytest tests / file.py ...“browser.config.browser_name = firefox”pytest 测试/file.py

Ok, now I got it.好的,现在我明白了。 Please have a look at the answer List all environment variables from the command line then.请看看答案然后从命令行列出所有环境变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM