Reputation: 3089
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?
Upvotes: 2
Views: 147
Reputation: 3089
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
Upvotes: 1
Reputation: 3089
This is happening regardless to PyCharm, NoseTest is looking for : delimiter between filename and class
If you run with different test suit, it will run
In general, PyCharm is running a test helper for running tests
If you override its default values (changing TEST_RUNNER value for instance), you might experience problems
Upvotes: 1