The monitoring part is working. All I need now is to know how to call
the tests from my "watcher" script.
As noted in the docs[2], I'm already running setup_test_environment()
in my script.
Now, how do I do the equivalent of the following from within my Python script?
python manage.py test myapp1 myapp2
[1] https://github.com/seb-m/pyinotify
[2] http://docs.djangoproject.com/en/1.3/topics/testing/#running-tests-outside-the-test-runner
Thanks,
Shawn
http://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code
Does this answer your question?
Kenny
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
This is *exactly* what I was looking for.
Unfortunately it doesn't work. It keeps saying that an app with that
label can not be found.
I've traced it down to django.db.models.loading.py, which imports
settings from django.conf, but it's
always 'django.conf.LazySettings object' instead of the proper settings
file.
This is odd, because os.environ['DJANGO_SETTINGS_MODULE'] is properly
set if I check it in pdb during that function.
I've even tried passing my settings module as a kwarg as described in
the doc you sent which doesn't work either.
In any case, I'm using the default -- 'settings.py' in the project folder.
Any ideas?
Thanks,
Shawn
Never mind. More pdb action and I figured out that I had overwritten
DJANGO_SETTINGS_MODULE at the bash prompt I was using to try this. All
my fault. Yay.
Now it works, thanks.
Shawn