Title pretty much says it all, I&#39;ve got some code that execs, I want to write tests for it. So far I&#39;m just having my tests fork, which sucks but works ok. I&#39;ve also thought about mocking exec, but that seems brittle (although maybe not, exec is kind of a well defined API boundary. I&#39;m wondering if anyone has any suggestions?<div>
<br></div><div>Alex</div><div><br></div><div>PS: Motivation for moving away from fork is that py.test --looponfail leaks child processes, and I&#39;m getting tired of cleaning up zombies every 5 minutes :D<br clear="all">
<div><br></div>-- <br>&quot;I disapprove of what you say, but I will defend to the death your right to say it.&quot; -- Evelyn Beatrice Hall (summarizing Voltaire)<br>&quot;The people&#39;s good is the highest law.&quot; -- Cicero<br>
<br>
</div>