Will dropping support for Python 2.6 have any effect here? I assumed the 
example would just switch to using unittest.TestCase instead of 
django.utils.unittest.TestCase, and the usability issue would remain.

I think having the warning above the example would help, but I'd still 
prefer having the (slower but less likely to cause an error in a different 
context) django.test.TestCase used in the initial example.


On Monday, March 25, 2013 2:08:54 PM UTC-4, Tim Graham wrote:
>
> It seems like it could be a dangerous precedent to cater to people who 
> don't take the time to fully read the docs, but in this case I'm a bit 
> sympathetic. On the other hand, this example will probably be a bit more 
> obvious when we drop support for Python 2.6 and no longer have 
> django.utils.unittest. At the least, we could probably move the warning 
> above the example so it's a bit more visible.
>
> On Saturday, March 16, 2013 8:27:01 PM UTC-4, Lorin Hochstein wrote:
>>
>> Hi there:
>>
>> On the Django testing overview doc page <
>> https://docs.djangoproject.com/en/dev/topics/testing/overview/>, the 
>> initial example uses unittest.TestCase. A Django developer who was looking 
>> for a quick reminder on how to write unit tests is likely to hit this page 
>> first. If that developer doesn't read the "warning" section below, they 
>> could mistakenly use unittest.TestCase when their unit tests change  the 
>> database. This very scenario happened to a colleague of mine.
>>
>> I proposed changing this to django.test.TestCase <
>> https://github.com/django/django/pull/903>, but that pull request with 
>> closed out by Aymeric Augustin, with reference to <
>> https://code.djangoproject.com/ticket/15896>. I don't think ticket 
>> #15986 covers quite the same issue, despite its title. Django devs, can you 
>> reconsider this doc patch?
>>
>> Take care,
>>
>> Lorin
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to