PR is ready for review: https://github.com/django/django/pull/4106

On Tuesday, February 10, 2015 at 12:00:13 PM UTC-5, Carl Meyer wrote:
>
> On 02/10/2015 12:08 AM, Jannis Leidel wrote: 
> >> On 10 Feb 2015, at 00:12, Tim Graham <[email protected] <javascript:>> 
> wrote: 
> >> 
> >> Is it a best practice? In my unscientific sampling, none of the 
> >> following ship tests inside the application directory, but rather 
> >> in a separate "tests" directory. Or did I misunderstand what you 
> >> meant? 
> >> 
> >> - Django REST framework - django-nap - the apps that split out from 
> >> contrib (formtools, comments, localflavor) 
> > 
> > I think there's been a tendency in the past years ever since we saw 
> > an increasing adoption of the unittest2 discover runner anecdotally 
> > (and maybe also the Nose and pytest runners) to localize reusable app 
> > tests outside their main package to not accidentally trigger them 
> > when installed in a Django project that uses the old style test 
> > runner. 
> > 
> > That's also been the reason why I moved the tests outside of 
> > formtools, localflavor and almost all my apps – providing tests in 
> > app repos makes sense, but to me the reason to put them into the main 
> > package is mostly historical, so nothing I would want to continue to 
> > promote for the freshly extracted localflavor and formtools apps. 
> > 
> > IIRC Carl had a more elaborate explanation at the time we were adding 
> > the discover runner to Django, but that's my gist of it. 
>
> Elaborate explanation? Sounds like me! :-) 
>
> The reason I've generally moved tests outside of reusable apps is the 
> one Jannis mentions - avoiding having the old pre-discovery runner run 
> them in people's projects. I think this reason becomes less relevant 
> with time. 
>
> Though I generally prefer separating test code from production code 
> anyway, even without any Django-specific considerations. 
>
> Carl 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/968fb454-162b-484b-b289-4fcf32439017%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to