plonewars.com

August 24th, 2007

Plone, el CMS estrella escrito en Python en versión 3.0

Plone, el CMS estrella escrito en Python en versión 3.0 Plone, Python Plone acaba de liberar su versión 3.0 tras un largo trabajo. Plone en un CMS open … de Python. De la versión 3.0 de Plone destacaría las siguientes mejoras: Versionado: algo que un CMS

Plone, el CMS estrella escrito en Python en versión 3.0

Originally from [Technorati] Tag results for plone


from Yoda http://plonewars.com/2007/08/24/plone-el-cms-estrella-escrito-en-python-en-version-30/







August 24th, 2007

How is the default effective date set? — LearnPlone

How is the default effective date set? — LearnPlone

Originally from del.icio.us/tag/plone by shills


from Yoda http://plonewars.com/2007/08/24/how-is-the-default-effective-date-set-%e2%80%94-learnplone/







August 24th, 2007

Products — Plone4Artists

All the software products used by the Plone4Artists project.

Products — Plone4Artists

Originally from del.icio.us/tag/plone by rizomer


from Yoda http://plonewars.com/2007/08/24/products-%e2%80%94-plone4artists/







August 24th, 2007

Zope configuration — Plone CMS: Open Source Content Management

Has nifty code showing easy way to start zope from init.d

Zope configuration — Plone CMS: Open Source Content Management

Originally from del.icio.us/tag/plone by lardymike


from Yoda http://plonewars.com/2007/08/24/zope-configuration-%e2%80%94-plone-cms-open-source-content-management/







August 24th, 2007

Behind the scenes of the Plone 3 launch — limi.net

Behind the scenes of the Plone 3 launch — limi.net

Originally from del.icio.us/tag/plone by cjohansen


from Yoda http://plonewars.com/2007/08/24/behind-the-scenes-of-the-plone-3-launch-%e2%80%94-liminet/







August 24th, 2007

Integrating pure Python tests with PloneTestCase — tomster.org

Integrating pure Python tests with PloneTestCase — tomster.org

Originally from del.icio.us/tag/plone by dirceu


from Yoda http://plonewars.com/2007/08/24/integrating-pure-python-tests-with-plonetestcase-%e2%80%94-tomsterorg/







August 24th, 2007

Tom Lazar: Integrating pure Python tests with PloneTestCase

Often, when writing a Plone Product I come across small methods that I need to implement, that actually have no dependency upon Plone itself but are too trivial and/or specific as to warrant putting them into a separate package. If that’s the case for you, too, you will undoubtedly start to get impatient when testing these methods, because with each friggin’ testrun an entire zope instance is created and torn down again. This I have become used to and accept it as part of life as Zope developer, if the code I’m testing actually needs that setup. But it just kept bugging me that I need to wait so long for tests that actually execute in under one second. So I’ve poked around today and came up with the following scenario:

  1. put your methods into a separate module that has no import dependencies from zope
  2. add a test runner to that module to execute its tests without starting up zope
  3. create a test suite for your product that will pick up the tests of your module

1. standalone module

For example, I’ve created a (crude) helper for batching some items in batching.py along with a little doctest testing some arbitrary edge cases:

def batch(items=[], batch=0, batchsize=5):    """returns a batch from the given items

    A functional test of the private method that calculates batches

        >>> items = range(12)        >>> batch(items, 3, 5)        Traceback (most recent call last):            ...        IndexError: No batch number 3

        >>> batch(items, 0, 5)        [0, 1, 2, 3, 4]

        >>> batch(items, 1, 5)        [5, 6, 7, 8, 9]

        >>> batch(items, 2, 5)        [10, 11]

        >>> batch(items, 2, 4)        [8, 9, 10, 12]    """    total = len(items)    maxbatchnum = batchnum(total, batchsize)    if batch >= maxbatchnum:        raise IndexError, \            "No batch number %d" % batch    else:        return items[batch * batchsize:(batch+1) * batchsize

I can use this method in my product with the following import statement:

from Products.PRODUCTNAME.batching import batch

2. add a test runner

Here you just need to follow the straightforward example given in the doctest documentation and add the following snippet to the bottom of batching.py:

def _test():    import doctest    doctest.testmod()

if __name__ == "__main__":    _test()

Now you can simply execute your module and it will run its tests at blazing speed – buckle up, Dorothy… This definitely makes for much nicer test driven development!

3. Zope integration

Now we just need to make sure, that the tests will also be executed, when we run our Product’s entire suite. This is done by writing a light-weight  Testcase based on Zope’s DocTestSuite that ‘picks’ up the standalone tests. I’ve named mine ‘testUtilities.py’ and stuck it right into my Product’s ‘test’ folder:

import unittestfrom unittest import TestSuitefrom zope.testing.doctestunit import DocTestSuite

def test_suite():    return TestSuite((        DocTestSuite('Products.PRODUCTNAME.batching'),        ))

if __name__ == '__main__':    unittest.main(defaultTest="test_suite")

Tom Lazar: Integrating pure Python tests with PloneTestCase

Originally from Planet Plone by Tom Lazar


from Yoda http://plonewars.com/2007/08/24/tom-lazar-integrating-pure-python-tests-with-plonetestcase/







August 24th, 2007

neaPolis – Sorrento Sprint

La trasmissione Neapolis di Raitre ha trasmesso un servizio sullo sprint di Sorrento cui abbiamo partecipato

neaPolis – Sorrento Sprint

Originally from del.icio.us/tag/plone by blindo71


from Yoda http://plonewars.com/2007/08/24/neapolis-sorrento-sprint/







August 24th, 2007

Tools of the Trade %u2014 Sean Kelly

Tools of the Trade %u2014 Sean Kelly

Originally from del.icio.us/tag/plone by federico_f


from Yoda http://plonewars.com/2007/08/24/tools-of-the-trade-u2014-sean-kelly/







August 24th, 2007

Little Innovations: Plone 3.0 and Wikiness

Little Innovations: Plone 3.0 and Wikiness Filed under: Wiki, Microformats, Wikis, Innovation, … innovations in this new version of Plone.  Other notable innovations include support for Microformats. Here

Little Innovations: Plone 3.0 and Wikiness

Originally from [Technorati] Tag results for plone


from Yoda http://plonewars.com/2007/08/24/little-innovations-plone-30-and-wikiness/