How do I configure PyCharm to run py.test tests?
PyCharm 2017.3
Preference -> Tools -> Python integrated Tools
- Choosepy.test
asDefault test runner
.- If you use Django
Preference -> Languages&Frameworks -> Django
- Set tick onDo not use Django Test runner
- Clear all previously existing test configurations from
Run/Debug configuration
, otherwise tests will be run with those older configurations. - To set some default additional arguments update py.test default configuration.
Run/Debug Configuration -> Defaults -> Python tests -> py.test -> Additional Arguments
I think you need to use the Run/Debug Configuration item on the toolbar. Click it and 'Edit Configurations' (or alternatively use the menu item Run->Edit Configurations). In the 'Defaults' section in the left pane there is a 'py.test' item which I think is what you want.
I also found that the manual didn't match up to the UI for this. Hope I've understood the problem correctly and that helps.