Re: contrib app tests
On Mon, 2007-05-21 at 18:27 -0500, Gary Wilson wrote: > Man, I really need to remember to always use email when posting to these > django lists. Too many of my web posts never show up. And here I > thought the internets was a truck I could just dump stuff on. > > Malcolm Tredinnick wrote: > > On Sat, 2007-05-19 at 00:16 -0500, Gary Wilson wrote: > >> Should we make Django's test runner look for and run all "tests" > >> packages/modules within the Django tree? Or maybe just those in > >> django.contrib? > > > > What's the advantage of looking everywhere? I tend to think this isn't > > worth it because tests for core should all be in one place, for ease of > > maintenance. > > I was thinking that, like the contrib apps, there are other subpackages > in django that could be stand alone packages (with their own tests). > > IMO, it's easier to go looking for tests in the subpackage you are > working on rather than to go hunt for where it is in modeltests or > regression tests. The directory names in modeltests and regressiontests > don't really tell you where in the code to look. I understand your motivation, but it smells like over complicating something that is already very functional and works well in practice. So, at the moment, I'm at most -0 on this. Regards, Malcolm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
Man, I really need to remember to always use email when posting to these django lists. Too many of my web posts never show up. And here I thought the internets was a truck I could just dump stuff on. Malcolm Tredinnick wrote: > On Sat, 2007-05-19 at 00:16 -0500, Gary Wilson wrote: >> Should we make Django's test runner look for and run all "tests" >> packages/modules within the Django tree? Or maybe just those in >> django.contrib? > > What's the advantage of looking everywhere? I tend to think this isn't > worth it because tests for core should all be in one place, for ease of > maintenance. I was thinking that, like the contrib apps, there are other subpackages in django that could be stand alone packages (with their own tests). IMO, it's easier to go looking for tests in the subpackage you are working on rather than to go hunt for where it is in modeltests or regression tests. The directory names in modeltests and regressiontests don't really tell you where in the code to look. Also, instead of modeltests, regressiontests, and contrib app tests sharing a common runtests.py namespace, we could make runtests.py accept a module/package name to test. Something like: python runtests.py newforms python runtests.py contrib.markup where the arguments have an implied "django." in front of them. Tests that span multiple packages could stay in the top level "tests" directory. But then how could we run these tests? Maybe we don't allow tests to have an implied "django." in front and running tests would be something like: python runtests.py django.newforms python runtests.py django.contrib.markup python runtests.py tests.modeltests.basic python runtests.py tests.modeltests Or use system path names instead of dots: python runtests.py ../django/newforms python runtests.py ../django/contrib/markup python runtests.py modeltests/basic python runtests.py modeltests which would have the benefit of being able to run tests outside of the django tree. Gary --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
On 5/19/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > The Djinn says "It is Done. You have two more wishes." "You think I *asked* for a 14-inch pianist?" (Thanks!) Jacob --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
On 5/20/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Committed in [5296], along with a quick proof of concept test for the > lorem ipsum template tag in contrib.webdesign. > > Caveats for new players - The contrib app needs to have a models.py in > order for tests to be found, even if the tests are in tests.py. It > doesn't matter if models.py is empty - it just needs to exist. Apps > need to be loaded in order to be tested, and load_app requires that > models.py exists. Oh - one more thing. To run the test for just one contrib app, use the name of the app: ./runtests.py --settings=foo webdesign Side effect - modeltest, regressiontest, and contrib all share a common namespace during test time - so don't create a modeltest called 'auth', etc. This was already the case for modeltest and regressiontest. The only existing test affected by this is regressiontest/markup, but this is a contrib test anyway, so I've moved it into the new contrib location in [5297]. Russ %-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
On 5/20/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > Agreed. This would also make moving third-party apps into contrib > easier (we wouldn't have to move tests to a different place). > > Anyone interested in modifying runtests to discover and load > django.contrib.*.tests? The Djinn says "It is Done. You have two more wishes." :-) Committed in [5296], along with a quick proof of concept test for the lorem ipsum template tag in contrib.webdesign. Caveats for new players - The contrib app needs to have a models.py in order for tests to be found, even if the tests are in tests.py. It doesn't matter if models.py is empty - it just needs to exist. Apps need to be loaded in order to be tested, and load_app requires that models.py exists. Russ %-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
On 5/19/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I had been thinking about this abit recently, too. I think the answer is > yes, they should. Otherwise every single test ends up having to load and > install every single contrib app (because the main test suite doesn't do > any differentiation based on requirements). Agreed. This would also make moving third-party apps into contrib easier (we wouldn't have to move tests to a different place). Anyone interested in modifying runtests to discover and load django.contrib.*.tests? Jacob --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: contrib app tests
On Sat, 2007-05-19 at 00:16 -0500, Gary Wilson wrote: > Should contrib app tests go in that particular contrib app's directory > as opposed to the global tests directory? I had been thinking about this abit recently, too. I think the answer is yes, they should. Otherwise every single test ends up having to load and install every single contrib app (because the main test suite doesn't do any differentiation based on requirements). There are a few logistics to work out here, though: how do you run individual contrib/ tests, for example. > > Should we make Django's test runner look for and run all "tests" > packages/modules within the Django tree? Or maybe just those in > django.contrib? What's the advantage of looking everywhere? I tend to think this isn't worth it because tests for core should all be in one place, for ease of maintenance. Regards, Malcolm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
contrib app tests
Should contrib app tests go in that particular contrib app's directory as opposed to the global tests directory? Should we make Django's test runner look for and run all "tests" packages/modules within the Django tree? Or maybe just those in django.contrib? Gary --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---