2

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 2

1

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

https://github.com/JetBrains/intellij-community/blob/master/python/helpers/pycharm/django_test_manage.py

If you override its default values (changing TEST_RUNNER value for instance), you might experience problems

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

I'm using a custom settings, and the path still contains a period instead of a colon. Did you do anything else to fix this?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.