使用 Pycharm 的 py.test 运行时,如何将插件选项传递给 py.test?



我正在尝试使用 Pycharm py.test 测试运行器运行一些测试,我需要将命令行选项传递给 py.test 插件(pytest-beds(。

我尝试将该选项添加到测试运行配置中的其他选项字段中,但出现以下错误:

Testing started at 9:54 AM ...
/usr/local/bin/python /Applications/PyCharm.app/Contents/helpers/pycharm/_jb_pytest_runner.py -- --sdk-path=/some/other/long/path/google-cloud-sdk/platform/google_appengine tests/test_fixture_handler
Launching py.test with arguments --sdk-path=/some/other/long/path/google-cloud-sdk/platform/google_appengine tests/test_fixture_handler in /some/long/path
usage: _jb_pytest_runner.py [options] [file_or_dir] [file_or_dir] [...]
_jb_pytest_runner.py: error: unrecognized arguments: --sdk-path=/some/other/long/path/google-cloud-sdk/platform/google_appengine
inifile: /some/long/path/pytest.ini
rootdir: /some/long/path
Process finished with exit code 2
Empty test suite.

在pytest.ini中添加收养选项,但我得到相同的结果。

基本上与以下问题相同:PyCharm无法加载NoseGAE。Google应用引擎包含一个古老的设置工具,它会干扰py.test加载插件。

最新更新