Where does the command "ls" in some doctest files come from ?

KLEIN Stéphane stephane at harobed.org
Mon Sep 8 14:15:15 CEST 2008


Hi,

for example, in http://svn.zope.org/zc.buildout/trunk/src/zc/buildout/
tests.py?rev=89831&view=auto test file, there is this doctests :

def develop_verbose():
    """
We should be able to deal with setup scripts that aren't setuptools based.

    >>> mkdir('foo')
    >>> write('foo', 'setup.py',
    ... '''
    ... from setuptools import setup
    ... setup(name="foo")
    ... ''')

    >>> write('buildout.cfg',
    ... '''
    ... [buildout]
    ... develop = foo
    ... parts = 
    ... ''')

    >>> print system(join('bin', 'buildout')+' -vv'), # doctest: +ELLIPSIS
    Installing...
    Develop: '/sample-buildout/foo'
    ...
    Installed /sample-buildout/foo
    ...

    >>> ls('develop-eggs')
    -  foo.egg-link
    -  zc.recipe.egg.egg-link

    >>> print system(join('bin', 'buildout')+' -vvv'), # doctest: 
+ELLIPSIS
    Installing...
    Develop: '/sample-buildout/foo'
    in: '/sample-buildout/foo'
    ... -q develop -mxN -d /sample-buildout/develop-eggs/...


    """

I wonder where does the "ls('develop-eggs')" command come from ?

It is doctest buildin command ? Where can I found some documentation 
about that ? I see this page http://docs.python.org/lib/module-
doctest.html and I found nothing about that subject.

Thanks for your help,
Stephane
http://docs.python.org/lib/module-doctest.html




More information about the Python-list mailing list