[wingide-users] Integrating with django's unit tests
gattster at gmail.com
Wed Jan 14 12:37:30 MST 2009
Stephan - Thank you for the detailed explanation. Wingware support
rocks. I'll take this to the django mailing list.
Chaiwat.S - Thank you. NoseDjango looks interesting, but I am fearful
of using 3rd party plugins to solve this problem because they tend to
cause problems later when it comes time to upgrade django.
On Jan 14, 2009, at 8:26 AM, Chaiwat Suttipongsakul wrote:
> Wingware Support wrote:
>> Philip Gatt wrote:
>>> Does anyone know how to integrate Wing with Django's unit tests?
>>> With my django projects, I usually run my unit tests with the
>>> following command:
>>> ./manage.py test
>>> I tried running unit tests within WingIDE, but the problem is that
>>> django does some setup & cleanup work that needs to run before the
>>> tests can be run. I'm not an expert here, but I suspect that we
>>> need to tie WingIDE into django's test runner.
>> Most likely you won't be able to get this working in Wing's Testing
>> since it assumes that tests will themselves do setup and tear-down
>> not depend on the inherited environment. The thing to look for or
>> about on a Django mailing list is whether there's a way to run the
>> outside of manage.py -- perhaps some option to have the tests
>> call setup/teardown functions.
>> Since this general issue also came up yesterday in the context of
>> we'll try to figure out some way to do this. The problem is that
>> test runner is packing up results in a way that Wing can read to
>> the Testing tool display, and combining that w/ the Django code's
>> over the tests would be essentially rewriting that code. It's
>> possible, but I'd like to see if there's a solution that won't
>> redoing the runner w/ every Django (and Zope3 and ...) release.
> I'm new on this, but you may try nose with NoseDjango plugin.
> nose: http://pypi.python.org/pypi/nose/0.10.4
> NoseDjango: http://pypi.python.org/pypi/NoseDjango/0.6
> AFAIK, NoseDjango will setup, teardown, create database, drop
> database for you.
> I'm learning this test tool too.
More information about the wingide-users