3

I'm trying to run some tests using the Pycharm py.test test runner and I need to pass a command line option to a py.test plugin (pytest-beds).

I've tried adding the option to the additional options field in the test run config, but I get the following error:

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.

Adding the option to adopts in pytest.ini, but I get the same result.

Paul Johnson
  • 1,329
  • 1
  • 12
  • 25
  • If the arguments are unrecognized, you did not install the plugin for the correct python version (what you're using with PyCharm). – hoefling May 25 '18 at 19:21

1 Answers1

0

Basically the same problem as: PyCharm unable to load NoseGAE. Google app engine includes an ancient setuptools that interferes with py.test loading plugins.

Paul Johnson
  • 1,329
  • 1
  • 12
  • 25