[wingide-users] Integrating with django's unit tests
cwt at bashell.com
Wed Jan 14 09:26:17 MST 2009
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
>> ./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
> 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
> 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.
I'm new on this, but you may try nose with NoseDjango plugin.
AFAIK, NoseDjango will setup, teardown, create database, drop database
I'm learning this test tool too.
More information about the wingide-users