[wingide-users] Integrating with django's unit tests

Philip Gatt 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  
>> tool
>> since it assumes that tests will themselves do setup and tear-down  
>> and
>> not depend on the inherited environment.  The thing to look for or  
>> ask
>> about on a Django mailing list is whether there's a way to run the  
>> tests
>> outside of manage.py -- perhaps some option to have the tests  
>> automatically
>> call setup/teardown functions.
>>
>> Since this general issue also came up yesterday in the context of  
>> Zope3,
>> we'll try to figure out some way to do this.  The problem is that  
>> Wing's
>> test runner is packing up results in a way that Wing can read to  
>> update
>> the Testing tool display, and combining that w/ the Django code's  
>> iteration
>> over the tests would be essentially rewriting that code.  It's  
>> certainly
>> possible, but I'd like to see if there's a solution that won't  
>> require
>> redoing the runner w/ every Django (and Zope3 and ...) release.
>>
> Hi,
>
> 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.
>
> Regards,
> Chaiwat.S



More information about the wingide-users mailing list