views:

76

answers:

1

Hi,

it's fairly easy to set up Eclipse to run a django project's tests created with django-admin startprojects, we whould just point a Run command to ./manage.py, and supply the necessary arguments.

but what can I do if a project is built using buildout? of course, bin/biuldout creates the handy bin/test-1.1 and bin/test-trunk files, but these are not integrated with eclipse

I can even run these as an external tool from Eclipse, but how can I get the nice code recognition of running manage.py test myapp?

does anyone know a solution? is there some buildout recipe that allows me to do this?

thanks for your help!

A: 

I'm assuming you use the djangorecipe recipe (http://pypi.python.org/pypi/djangorecipe)?

In that case, why can you apparently run "manage.py test myapp" and why can't you run "bin/django test myapp"? (Or "bin/test" for that matter)?

I suppose you have to configure that manage.py call somewhere, so why can't you configure bin/django in the same way? In the end, bin/django is just a python script, too. Have you tried calling it in the same way as manage.py?

Reinout van Rees
Actually, I could not find a manage.py file using djangorecipe. The created scripts uner bin are python scripts that simply import djangorecipe.test.The reason why I did not called bin/django or bin/test directly was because it wasn't offered by eclipse as bin is not a python module (it does not contain an __init__.py file)Anyway, I've found a solution, and it was to simply give the full path to the test script created by djangorecipe. So the main module is something like: ${workspace_loc:django-contacts/bin/test-1.1}, and now it works like a charm.Thanks for you help.