[py-dev] Testing daemonize() (of sorts)

James Mills prologic at shortcircuit.net.au
Sun Feb 14 15:48:41 CET 2010

Hi Folks,

Not sure how big this community here is, but at
the suggestion of Ronny, here's a problem I'd like
to "throw" at you:

Consider the following test for my library circuits (1):


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.

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

Anyone have any suggestions or workarounds here ?



1. http://code.google.com/p/circuits/
2. http://bitbucket.org/prologic/circuits-dev/src/1e4ebb87eafc/circuits/app/__init__.py#cl-20

-- "Problems are solved by method"

More information about the Pytest-dev mailing list