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

Wingware Support support at wingware.com
Wed Jan 14 09:12:20 MST 2009

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.


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list