Metadata-Version: 1.0
Name: ulif.plone.testsetup
Version: 0.1.1
Summary: Easier test setup for Plone 3 projects.
Home-page: https://cheeseshop.python.org/pypi/ulif.plone.testsetup
Author: Uli Fouquet
Author-email: uli@gnufix.de
License: ZPL 2.1
Description: 
        ulif.plone.testsetup
        ********************
        
        is a package that provides some convenience stuff to enable rapid test
        setup for Plone packages. Currently doctests (normal unit doctests and
        functional doctests) and usual Python tests made of
        ``unittest.TestCase`` (and derived) definitions are supported.
        
        Doctests and test modules are found throughout a whole package and
        registered with sensible, modifiable defaults.
        
        Also support for reusable test setups is provided by so-called
        TestGetters and TestCollectors.
        
        Setting up doctests (contrary to *writing* those tests) can become
        cumbersome with Plone. In the environment you often have to prepare
        complex things like test layers, setup functions, teardown functions
        and much more. Often this steps have to be done again and again.
        
        ``ulif.plone.testsetup`` can shorten this work by setting sensible
        defaults for the most important aspects of test setups.
        
        See `README.txt` in the ``src/ulif/plone/testsetup`` directory for API
        documentation. ``ulif.plone.testsetup`` is an extension of the Zope 3
        package `z3c.testsetup
        <http://cheeseshop.python.org/pypi/z3c.testsetup>`_ in which all the
        basic stuff is defined and documented. Please see the .txt files in
        this package for deeper insights about TestCollectors and the like.
        
        Note, that this is alphaware! Do not use it in productive
        environments!
        
        
        
        Prerequisites
        =============
        
        You need::
        
        - Python 2.4. Rumors are, that also Python 2.5 will do.
        
        - `setuptools`, available from
        http://peak.telecommunity.com/DevCenter/setuptools
        
        Other needed packages will be downloaded during
        installation. Therefore you need an internet connection during
        installation.
        
        
        Installation
        ============
        
        From the root of the package run::
        
        $ python2.4 bootstrap/bootstrap.py
        
        This will download and install everything to run `buildout` in the
        next step. Afterwards an executable script `buildout` should be
        available in the freshly created `bin/` directory.
        
        Next, fetch all needed packages, install them and create provided
        scripts::
        
        $ bin/buildout
        
        This should create an `instance` script in `bin/`.
        
        Running::
        
        $ bin/instance test -s ulif.plone.testsetup
        
        you can test the installed package.
        
        
        Usage
        =====
        
        See `README.txt` and the other .txt files in the
        ``src/ulif/plone/testsetup`` directory for API documentation.
        
        
        
        
        Detailed Documentation
        **********************
        
        ulif.plone.testsetup
        ********************
        
        A package for easier test setups with Plone 3.
        
        ``ulif.plone.testsetup`` tries to ease the writing of testsetups. This
        can be a mess, especially when using Plone. There is always a complex
        framework to setup and all that might afraid people so that they do
        not write tests at all. In that sense, ``ulif.plone.testsetup`` is a
        try to take away excuses for not testing.
        
        Note, that this package is meant for use with Plone 3. Other versions
        are not tested!
        
        Please note also, that this document is *not* an introduction into
        writing tests, but into *setup* of tests. The difference is, that the
        many kind of tests supported by Zope and Python need to be found by a
        testrunner and some, functional tests for example, need a special
        framework to be setup before the tests can actually run. That's what
        this package is for: minimizing the effort, to find and setup tests.
        
        A Simple Test Setup
        ===================
        
        Setting up a test with this package in the minimal form comes down to
        this::
        
        >>> from ulif.plone.testsetup import register_all_plone_tests
        >>> test_suite = register_all_plone_tests(
        ...    'ulif.plone.testsetup.tests.cave')
        
        This will find all tests registered in the ``cave`` package and
        deliver them to a testrunner when called. All we have to do, is to get
        the ``register_all_plone_tests`` function and to pass it a package.
        
        We specified the package to be searched for tests by a so-called
        dotted name, but we can also pass the real package::
        
        >>> from ulif.plone.testsetup.tests import cave
        >>> test_suite = register_all_plone_tests(cave)
        
        In both cases we will get a ``PloneTestCollector``::
        
        >>> test_suite
        <ulif.plone.testsetup.plonetesting.PloneTestCollector object at 0x...>
        
        When called, it will return a test suite::
        
        >>> test_suite()
        <unittest.TestSuite tests=[...]>
        
        
        
        
        CHANGES
        *******
        
        0.1.1 (unreleased)
        ==================
        
        
        
        0.1 (2008-03-05)
        ================
        
        Feature changes
        ---------------
        
        - Initial release, factored out from z3c.testsetup-dev
        
        
        Download
        ********
        
Keywords: plone3 plone zope test unittest doctest testsetup
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Framework :: Plone
Classifier: Topic :: Software Development :: Libraries :: Python Modules
