django_nose failing to discover tests
I am trying to get django_nose to discover tests in my project. I watched this video which seems to indicate that my project/app/tests/__init__.py should be able to be empty (not contain a bunch of import * statements):
http://pyvideo.org/video/1406/djangos-nasal-passage
The goal is to have django_nose find my tests by name so I do not have to have import * from ... statements within my tests/__init__.py for every app. My project is set up like this:
/myproject
/accounts
__init__.py
/tests
__init__.py
test_account.py
The __init__.py file is empty. The test_account.py file contains an AccountTest class derived from unittest.TestCase.
When I run ./manage.py test accounts (with an empty __init__.py), the result is "Ran 0 tests in 0.000s"
Now, if I make accounts/tests/__init__.py contain the line from test_account import *, it works correctly; therefore, I believe I do have django_nose (version 1.1 and nose 1.2.1) installed and working.
I Googled all morning to solve the problem but have failed. If you have any insight, please reply. Thank you.
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gs8Mcwfs_nUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home