Example #1
0
    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()
Example #2
0
 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()
Example #3
0
 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()
Example #4
0
 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()