Don't have 'py.test in ...' in context menu
已回答
Hi all,
Although it is looks like I did everything required for Pycharm to understand that my module contain tests I don't see this option when I right click a tests module or test in a module. I have no unittest option or py.test
1. I changed the Default test runner for the project to py.test
2. My module name and test names inside it starts with test
My module relative path is: tests/unit/devices/services/test_device_type_service.py
What am I missing?
Thanks
Guy
请先登录再写评论。
Hi! Please make sure there's no existing pure Python Run Configuration for this file. By default, PyCharm suggests existed Run Configuration. If this is not the case - please provide a code sample from the test module itself.
Thank you for your answer Pavel.
My run configuration section is empty(only the defaults).
See below example of my tests
Could you please specify which PyCharm version you are using? There were few related fixes in the latest builds; please check if 2017.3 shows the same behavior.
I used 2017.2.4 update to latest 2017.3.1 and it looks good.
Will test it for a while and will update.
Thanks a lot Pavel
I switched my test runner from default unitttest to pytest and I had to close and re-open the project so it starts to create pytest run configurations with right click menu