[TIP] [Distutils] RFC: Barely minimal CI + tests + packaging in Python WAS: Guidelines for where to put tests & how to package them

Olemis Lang olemis at gmail.com
Thu Mar 11 08:15:21 PST 2010


On Thu, Mar 11, 2010 at 10:47 AM, Chris Withers <chris at simplistix.co.uk> wrote:
> P.J. Eby wrote:
>>
>> At 01:34 PM 3/11/2010 +0000, Chris Withers wrote:
>>>
>>> When I last tried using setuptools test_require stuff (in a buildout
>>> driven pylons app, iirc) I ended up with the resulting eggs dumped in the
>>> root of my buildout and no, the ddn't go away at the end of the test run...
>>
>> Interesting.  Must be an artifact of how buildout calls things, then,
>> because setuptools drops them to the *current* directory, under
>> circumstances that assume it's running in the setup.py directory.
>
> It is, but for a develop egg, that's your checkout, and that's where the
> testing dependency eggs get dumped!
>

In order to do this in developer mode what I do is

{{{
#!sh

virtualenv buildenv
buildenv/bin/easy_install setuptools==dev
buildenv/bin/easy_install unittest-xml-reporting
buildenv/bin/easy_install ciutils
buildenv/bin/easy_install -eb . -f http://pypi.python.org/pypi/Trac/0.11.4 Trac
cd trac && ../buildenv/bin/python setup.py develop
cd trunk && ../buildenv/bin/python setup.py test -r ciutils:junitrunner

}}}

-b switch is for the download folder ;o)

PS: Real & full snippet is available to setup TracXmlRpc @ testrun.org
[1]_ . In fact this has ramifications related to Titus' thread about
packaging and illustrates how to install test code for a package that
normally doesn't include them (bdist_xxx), using `setuptools`

Wow ! I am learning about the setuptools thingie . I love it more and
more everyday !!! (probably until I find the hidden monsters ? where
are they ? :P )

.. [1] Hudson » tracrpc » tracrpc-th
         (http://hudson.testrun.org/view/tracrpc/job/tracrpc-th/configure)

-- 
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:
On adding Hessian (RPC) support for Trac -
http://feedproxy.google.com/~r/simelo-en/~3/Vit6dRudChU/on-adding-hessian-rpc-support-for-trac.html



More information about the testing-in-python mailing list