[Mailman-Developers] (no subject)

arnaud.le-roy at voila.fr arnaud.le-roy at voila.fr
Tue Jun 7 22:59:07 CEST 2011


Hi Barry, 

Happy to confirm that it helps. These convenience functions ease the discovery for first time players, so
from this point of view this is an added benefit of your trade-off.

Thanks, 
Arnaud      


> Message du 07/06/11 à 21h57
> De : "Barry Warsaw" <barry at list.org>
> A : mailman-developers at python.org
> Copie à : arnaud.le-roy at voila.fr
> Objet : Re: [Mailman-Developers] (no subject)
> 
> Hi Arnaud,
> 
> On Jun 07, 2011, at 11:55 AM, arnaud.le-roy at voila.fr wrote:
> 
> >I've just installed mailman 3 : as my goal is to use it with the REST
> >interface or custom scripts, I'd like to get a good grasp of how it is
> >working. So, I'm trying to use it in interactive mode as in the package
> >documentation. However, I'm not sure of the best way to be in the same
> >context as in the documentation examples. At first I tried the "py" script
> >under bin, but everything is not initialised (eg I have component not found
> >errors for getUtility). Then I tried with mailman withlist. It works better
> >now but I now see the dump_list function in the examples and I had to import
> >it manually. So my question is : what is the context of the examples and how
> >can I set it up ? Or are they all "ad hoc" with no general way to be in the
> >same state ?
> 
> You're pretty close, actually.  The documentation does assume a slightly
> crafted global namespace, which you can see in
> src/mailman/tests/test_documentation.py.  Look in the setup() function.  I've
> tried to keep these 'magic test gobals' to a minimum, but some are just too
> darn convenient.
> 
> You're right that bin/py does not initialize the system.  That's exactly what
> `bin/mailman withlist` does though.  As you've seen, you will have to manually
> import certain names though, exactly the ones that test_documentation.py puts
> in the doctest globals.  It should be fairly obvious from looking at that file
> what you'll need and where to get it from.
> 
> The other tricky bit about the test suite is that you might need to take into
> account the "layer" feature of zope.testing.  You'll find all the testing
> layers in src/mailman/testing/layers.py and for doctests, some package
> __init__.py files have a `layer` global that defines the layer for doctests in
> that package.  See for example src/mailman/rest/docs/__init__.py.
> 
> I hope that helps.
> -Barry
> >
> [ signature.asc (0.8 Ko) ]

____________________________________________________

  Découvrez les photos des sportives les plus sexy sur Voila http://people.voila.fr/people/mediatheque/dossiers/les-sportives-les-plus-sexy/





More information about the Mailman-Developers mailing list