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