views:

40

answers:

2

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?

+1  A: 

There's no such thing. Put all your tests in an app.

Daniel Roseman
+1  A: 

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

JivanAmara