PyCharm run django single test as part of class

Viewed 134

When running single test in PyCharm (django), the IDE create new config with target

boo.bar.tests.TestClass.test_whatwver 

This will not run the test, as the class is considered to be a method

when running

boo.bar.tests:TestClass.test_whatwver 

(with colon between tests:TestClass test will be executed

is there a way telling PyCharm doing it by default?

2 Answers

the problem is that pycharm won't recognise custom settings.py (called it test_settings.py), so it needs to be configured manually

go to Preferences | Languages & Frameworks | Django and set Settings file path to your local settings.py

Related