(self)
| 3491 | self.assertRaises(OSError, writer.poll) |
| 3492 | |
| 3493 | def test_spawn_close(self): |
| 3494 | # We test that a pipe connection can be closed by parent |
| 3495 | # process immediately after child is spawned. On Windows this |
| 3496 | # would have sometimes failed on old versions because |
| 3497 | # child_conn would be closed before the child got a chance to |
| 3498 | # duplicate it. |
| 3499 | conn, child_conn = self.Pipe() |
| 3500 | |
| 3501 | p = self.Process(target=self._echo, args=(child_conn,)) |
| 3502 | p.daemon = True |
| 3503 | p.start() |
| 3504 | child_conn.close() # this might complete before child initializes |
| 3505 | |
| 3506 | msg = latin('hello') |
| 3507 | conn.send_bytes(msg) |
| 3508 | self.assertEqual(conn.recv_bytes(), msg) |
| 3509 | |
| 3510 | conn.send_bytes(SENTINEL) |
| 3511 | conn.close() |
| 3512 | p.join() |
| 3513 | |
| 3514 | def test_sendbytes(self): |
| 3515 | if self.TYPE != 'processes': |
nothing calls this directly
no test coverage detected