python - 使用 Pycharm pytest runner 时如何将插件选项传递给 pytest?

标签 python pycharm pytest

我正在尝试使用 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 unable to load NoseGAE . Google 应用引擎包含一个古老的设置工具,它会干扰 py.test 加载插件。

关于python - 使用 Pycharm pytest runner 时如何将插件选项传递给 pytest?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50533848/

相关文章:

python - 自定义pycharm IDE等emacs

python - curl 作为 Zapier Webhook 到 Stripe

python - Heroku 不再支持 Celery 了吗?

python - 通过外部网站上传图片到头像个人资料

python - 无法使用 SSZipArchive 在 iOS9 中解压缩大型 zip 文件 (3.3GB)

python - Django 测试 - 导入错误 : Start directory is not importable

python - PyCharm可以将变量值显示为十六进制数吗?

python - Pytest - 测试后如何查找测试结果

sqlalchemy - SQLAlchemy 连接的模拟异步上下文管理器

python - 如何跨 pytest 装置同步参数化?