[Python-projects] logilab-common test issues

Adrien Di Mascio Adrien.DiMascio at logilab.fr
Fri Mar 2 08:49:01 CET 2007


Hi,

[Marien Zwart]

> Because of the place option parsing happens pytest relies on there
> being exactly one directory called "test" or "tests" somewhere below
> the current directory. The "pytest" main script walks down from the
> current directory and calls testlib.main on every directory called
> test or tests it finds. This main function then (re)parses the
> arguments and runs the tests. This is especially annoying for --help
> (which does nothing if there is no test or tests dir below the current
> one) or -t (specify testdir explicitly, which does nothing if there is
> no test or tests dir below the current one and runs the tests more
> than once if there is more than one).

As you might have seen, pytest is somewhat tailored to our internal
needs / architecture. We'll try to improve this in the next release of
logilab common.

> fileutils.abspath_listdir has a doctest that relies on /home
> containing exactly the directories "adim", "alf", "arthur" and "auc".
> I'm guessing this should either not be picked up as a doctest or not
> rely on those directories being there (and no others).

The docstring of abspath_listdir was written as a simple documentation,
and was not meant to be run by doctest. I'll fix that quickly.

> For some reason I have not been able to determine the unittest_testlib
> output capture tests fail if I run pytest with the output redirected
> to a file. I get (reformatted and with the long strings of "---"
> shortened a bit for linewrapping):

I'll have a look at that.
Thanks for the report.

Cheers,

-- 
Adrien Di Mascio                                LOGILAB, Paris (France).
Formations Python,Zope,Debian,Calcul    http://www.logilab.fr/formations
Développement logiciel sur mesure:      http://www.logilab.fr/services
Informatique scientifique:              http://www.logilab.fr/science
Python in Python:     http://codespeak.net/pypy/dist/pypy/doc/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20070302/1e86b3d0/attachment.pgp 


More information about the Python-Projects mailing list