def test_wait_with_kill(test): """Tests wait(kill = ...).""" start_time = time.time() process = sh.sleep("3").execute(wait=False) assert process.wait(kill=signal.SIGTERM) == 143 assert time.time() < start_time + 1
def test_wait_with_kill(test): """Tests wait(kill = ...).""" start_time = time.time() process = sh.sleep("3").execute(wait = False) assert process.wait(kill = signal.SIGTERM) == 143 assert time.time() < start_time + 1
def test_wait(test): """Tests wait().""" start_time = time.time() process = sh.sleep("3").execute(wait=False) assert time.time() < start_time + 1 assert process.wait() == 0 assert time.time() >= start_time + 3
def test_kill(test): """Tests kill().""" start_time = time.time() process = sh.sleep("3").execute(wait=False) process.kill() assert process.wait() == 143 assert time.time() < start_time + 1
def test_wait(test): """Tests wait().""" start_time = time.time() process = sh.sleep("3").execute(wait = False) assert time.time() < start_time + 1 assert process.wait() == 0 assert time.time() >= start_time + 3
def test_kill(test): """Tests kill().""" start_time = time.time() process = sh.sleep("3").execute(wait = False) process.kill() assert process.wait() == 143 assert time.time() < start_time + 1