def test_local_daemon(self): from plumbum.cmd import sleep proc = local.daemonic_popen(sleep[5]) with pytest.raises(OSError): os.waitpid(proc.pid, 0) proc.wait()
def test_local_daemon(self): from plumbum.cmd import sleep proc = local.daemonic_popen(sleep[5]) try: os.waitpid(proc.pid, 0) except OSError: pass else: self.fail("I shouldn't have any children by now -- they are daemons!") proc.wait()