我尝试使用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中添加要采用的选项,但我得到相同的结果。