[TIP] Strategies for testing exec
alex.gaynor at gmail.com
Sun Dec 9 22:06:52 PST 2012
Title pretty much says it all, I've got some code that execs, I want to
write tests for it. So far I'm just having my tests fork, which sucks but
works ok. I've also thought about mocking exec, but that seems brittle
(although maybe not, exec is kind of a well defined API boundary. I'm
wondering if anyone has any suggestions?
PS: Motivation for moving away from fork is that py.test --looponfail leaks
child processes, and I'm getting tired of cleaning up zombies every 5
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python