Reputation: 10477
PyCharm's test runner does a great job with unit tests, likewise the run command contextually recognizes if you are in a unit test in a helpful way. Is there any way to get it to do the same with doctests running within the Django environment? (As opposed to Python doctests, which PyCharm supports -- but which don't work for a Django project because the run environment isn't set up correctly.)
Upvotes: 7
Views: 319
Reputation: 36
I don't believe it's possible.
My approach has been to create a "Django tests" configuration and specify a target, custom settings and options. (Menu: Run -> Edit Configurations... -> Click on the + icon to create a new configuration) I do something like this when I'm working in a particular module and simply change the settings appropriately to get the set of tests you want.
Not as nice as having it off the right-click run menu unfortunately.
Upvotes: 0