This seems like a no-brainer, and I'm hesitant to admit that I've spent about two hours trying to find the answer, but I can't figure out how to run project-level tests for a django project.
Just to be clear, running tests for the apps in the project is no problem. I understand './manage.py test', but it doesn't find the project-level tests that I have written.
I tried putting the project-level tests in 'my-django-project/tests.py' and 'my-django-project/tests/testcode.py' but these tests aren't found. What am I missing?
There's no such thing. Put all your tests in an app.
While there isn't something built into Django, Django-nose finds and runs tests at the project level as well as any subdirectories. Unfortunately, it doesn't find tests for installed apps that aren't placed in a subdirectory of the project directory.
Installation instructions can be found at: http://pypi.python.org/pypi/django-nose/0.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With