[wingide-users] Targeting specific Django tests.

Alice Bevan–McGregor alice at gothcandy.com
Tue Jan 22 17:25:52 EST 2013


On 2013-01-22 22:11:48 +0000, Wingware Support said:
> I'm not certain what would cause this but in general I think the Django
> unit test support relies on using manage.py to discover tests, rather
> than adding them individually.

Unfortunately I need to be able to run tests a single sub-application 
at a time, and, better, a single test class or test method from a 
single sub-application like my example.

The only thing missing is the sub-application prefix; it's so very 
close to working.  :)

> It might be possible to fix this by altering the sources of the Django
> test runner.  You can see the sources in src/testing/runners in your
> Wing installation.  To work with them you would copy the source into
> bin/2.5/src/testing/runners and mess around with it or add diagnostics.
> You can place breakpoints in tests and debug the tests from the Testing
> tool and then should be able to go up the stack into the runner code.

I'll poke around and see what I can come up with.  I suspect it's 
trimming the package namespace a bit too much.  Project-wise I'm in the 
process of migrating from Django's default internal test runner (a 
bundled version of unittest2) to DjangoNose for a codebase approaching 
140KSLoC.  (We have a lot of tests.  ;)

> If this doesn't help please let us know which version of Django this is.

Django 1.4.1.

Thanks for the quick reply!

	— Alice.




More information about the wingide-users mailing list