On 06/14/2012 07:25 AM, Jannis Leidel wrote:
> On 14.06.2012, at 12:35, Chris Wilson wrote:
>> Hi all,
>> 
>> I've made some improvements (in my view) to the
>> DjangoTestSuiteRunner. I got tired of having to remember my test
>> class names and of typing so much:
>> 
>> ./manage.py test binder.BinderTest.test_can_create_users
>> 
>> This new version searches for tests with the given name in all 
>> INSTALLED_APPS, so you can just type this:
>> 
>> ./manage.py test test_can_create_users
>> 
>> You can find the source code here:
>> 
>> https://github.com/aptivate/intranet-binder/blob/master/testing.py
>> 
>> Is this something that might be interesting to add to Django core?
> 
> 
> Yes! In fact there is a ticket for it already:
> https://code.djangoproject.com/ticket/17365
> 
> I've also released a almost similar tool called
> django-discover-runner based on Carl's work:
> http://pypi.python.org/pypi/django-discover-runner

It looks to me like Chris' added feature is actually kind of orthogonal
to #17365. #17365 is about lifting the "tests must be in tests.py of an
installed app" restriction in favor of unittest2 discovery. Chris' patch
allows searching for a test by name alone rather than full
app.TestCase.name.

Both seem useful enough, and could be combined. It pains me a bit to add
more specialized features to Django's test runner, rather than upstream
in one of the commonly-used Python test runners (such as unittest2), as
I'd rather move in the direction of less custom Django test-runner code
rather than more. But I guess that has to be balanced against the
convenience value of the feature.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to