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