view tests/doctest.txt @ 9:aa673036ecc1

correct string
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 08 Jul 2011 13:10:20 -0700
parents 5905459d4ebe
children d1f090c5f291
line wrap: on
line source

Test carton
===========

The obligatory imports:

    >>> import carton
    >>> import os

Make a temporary directory::

    >>> import tempfile
    >>> directory = tempfile.mkdtemp()

Invoke carton::

    >>> os.chdir(directory)
    >>> packages = [os.path.join(here, i) for i in 'packageB', 'packageA']
    >>> carton.main(['foo'] + packages)
    >>> os.listdir('.')
    ['foo.py']

Clean up::

    >>> import shutil
    >>> shutil.rmtree(directory)