Hi James, On Mon, Feb 15, 2010 at 00:48 +1000, James Mills wrote: > Hi Folks, > > Not sure how big this community here is, but at
There are around 130 people subscribed here but i don't know how many are how deep into things :) > the suggestion of Ronny, here's a problem I'd like > to "throw" at you: > > Consider the following test for my library circuits (1): > > http://bitbucket.org/prologic/circuits-dev/src/tip/tests/app/test_daemon.py > > Notice how I have to externally call "python app.py <pidfile>" in order to > make the test work ? I haven't found a way to integrate the app within the > test function/module at all without errors flying widely. sidenote: i think you could make good use of the "tmpdir" funcarg here to avoid writing ".pid" files to random places. See "py.test --funcargs" for info. > The problem with the above method (although works and passes) is that > the no coverage data is picked up by the fact that "app.py" was executed > and therefore parts (or all) of the Daemon Component (2) were actually > covered. > > Anyone have any suggestions or workarounds here ? IMO this needs looking a) into how to merge coverage data and report it from multiple sources (probably pytest-coverage which you are working on could be tweaked) b) how to write a nice funcarg that helps running a python script with coverage configured accordingly. That funcarg should maybe live with that plugin. HTH, holger _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev