How to specify command line options for py.test

I cannot seem to figure out how to pass multiple command line options to py.test. I have tried what I believe to be just about every combination of possibility and none of them work. I have had to resort to using a pytest.ini file in the root of my project, but I'd much rather be able to change command line options on the fly.

Can anyone help me out and tell me how to do this?

Thanks,

Bob

0
5 comments

In the py.test run configuration settings (Run | Edit Configurations...), you can select your configuration, check a checkbox next to the "Options" field and enter the command line options there.

0
Avatar
Permanently deleted user

I've just tried this myself and a single command line option works but as soon as you have more than one then they appear to combine.

For example, the command line options:

--driver=firefox --firefoxpath=/Applications/Firefox.app/Contents/MacOS/firefox

Appears to be interpreted as:

--driver="firefox --firefoxpath=/Applications/Firefox.app/Contents/MacOS/firefox"

Instead of two separate options. I have tried several methods of separating the options.

0
Avatar
Permanently deleted user

I agree with Dave. That is preceisely the problem I am seeing, and is why I posted the question in the first place. Thanks Dave for being more specific than me.

0

This is a bug. Please file an issue at http://youtrack.jetbrains.net/

0
Avatar
Permanently deleted user
0

Please sign in to leave a comment.