(self)
| 3531 | self.assertIsNotNone(proc.returncode) |
| 3532 | |
| 3533 | def test_send_signal_race2(self): |
| 3534 | # bpo-40550: the process might exist between the returncode check and |
| 3535 | # the kill operation |
| 3536 | p = subprocess.Popen([sys.executable, '-c', 'exit(1)']) |
| 3537 | |
| 3538 | # wait for process to exit |
| 3539 | while not p.returncode: |
| 3540 | p.poll() |
| 3541 | |
| 3542 | with mock.patch.object(p, 'poll', new=lambda: None): |
| 3543 | p.returncode = None |
| 3544 | p.send_signal(signal.SIGTERM) |
| 3545 | p.kill() |
| 3546 | |
| 3547 | def test_communicate_repeated_call_after_stdout_close(self): |
| 3548 | proc = subprocess.Popen([sys.executable, '-c', |
nothing calls this directly
no test coverage detected