Tests that a custom child process is not waited on (Issue 1540386)
(testcase)
| 48 | @test.support.requires_fork() |
| 49 | @contextlib.contextmanager |
| 50 | def simple_subprocess(testcase): |
| 51 | """Tests that a custom child process is not waited on (Issue 1540386)""" |
| 52 | pid = os.fork() |
| 53 | if pid == 0: |
| 54 | # Don't raise an exception; it would be caught by the test harness. |
| 55 | os._exit(72) |
| 56 | try: |
| 57 | yield None |
| 58 | except: |
| 59 | raise |
| 60 | finally: |
| 61 | test.support.wait_process(pid, exitcode=72) |
| 62 | |
| 63 | |
| 64 | class SocketServerTest(unittest.TestCase): |
no test coverage detected
searching dependent graphs…