First time here? Check out the FAQ!

Revision history  [back]

django testing keeps adding 'unittest', fails to find some tests

My Django unit tests are in 'tests' subdirectory under the project. There are two files in this subdirectory - tests.py and test_auth.py. There is an __init__.py in this subdirectory also. I can directly execute 'python manage.py test tests' just fine.

I have configured Project -> Testing for 'Django Tests'. I have tried with and without 'Test file patterns' set with a glob to the testing subdirectory.

In all cases when I 'Run Tests' the tests in tests.py are executed. The tests in test_auth.py are not executed. In addition there is an error shown "ImportError: Failed to import test module: tests.test_auth".

My configuration seems pretty straightforward, are there any examples how to get this to work? For example, how to configure the equivalent of " $ python manage.py test tests.test_auth" ?

Thanks.

django testing keeps adding 'unittest', fails to find some tests

My Django unit tests are in 'tests' subdirectory under the project. There are two files in this subdirectory - tests.py and test_auth.py. There is an __init__.py in this subdirectory also. I can directly execute 'python manage.py test tests' just fine.

I have configured Project -> Testing for 'Django Tests'. I have tried with and without 'Test file patterns' set with a glob to the testing subdirectory.

In all cases when I 'Run Tests' the tests in tests.py are executed. The tests in test_auth.py are not executed. In addition there is an error shown "ImportError: Failed to import test module: tests.test_auth".

My configuration seems pretty straightforward, are there any examples how to get this to work? For example, how to configure the equivalent of " $ python manage.py test tests.test_auth" test_auth" ?

Thanks.

django testing keeps adding 'unittest', fails to find some tests

My Django unit tests are in 'tests' subdirectory under the project. There are two files in this subdirectory - tests.py and test_auth.py. There is an __init__.py in this subdirectory also. I can directly execute 'python manage.py test tests' just fine.

I have configured Project -> Testing for 'Django Tests'. I have tried with and without 'Test file patterns' set with a glob to the testing subdirectory.

In all cases when I 'Run Tests' the tests in tests.py are executed. The tests in test_auth.py are not executed. In addition there is an error shown "ImportError: Failed to import test module: tests.test_auth".

My configuration seems pretty straightforward, are there any examples how to get this to work? For example, how to configure the equivalent of " $ python manage.py test test_auth" ?

Thanks.