(self)
| 3512 | p.join() |
| 3513 | |
| 3514 | def test_sendbytes(self): |
| 3515 | if self.TYPE != 'processes': |
| 3516 | self.skipTest('test not appropriate for {}'.format(self.TYPE)) |
| 3517 | |
| 3518 | msg = latin('abcdefghijklmnopqrstuvwxyz') |
| 3519 | a, b = self.Pipe() |
| 3520 | |
| 3521 | a.send_bytes(msg) |
| 3522 | self.assertEqual(b.recv_bytes(), msg) |
| 3523 | |
| 3524 | a.send_bytes(msg, 5) |
| 3525 | self.assertEqual(b.recv_bytes(), msg[5:]) |
| 3526 | |
| 3527 | a.send_bytes(msg, 7, 8) |
| 3528 | self.assertEqual(b.recv_bytes(), msg[7:7+8]) |
| 3529 | |
| 3530 | a.send_bytes(msg, 26) |
| 3531 | self.assertEqual(b.recv_bytes(), latin('')) |
| 3532 | |
| 3533 | a.send_bytes(msg, 26, 0) |
| 3534 | self.assertEqual(b.recv_bytes(), latin('')) |
| 3535 | |
| 3536 | self.assertRaises(ValueError, a.send_bytes, msg, 27) |
| 3537 | |
| 3538 | self.assertRaises(ValueError, a.send_bytes, msg, 22, 5) |
| 3539 | |
| 3540 | self.assertRaises(ValueError, a.send_bytes, msg, 26, 1) |
| 3541 | |
| 3542 | self.assertRaises(ValueError, a.send_bytes, msg, -1) |
| 3543 | |
| 3544 | self.assertRaises(ValueError, a.send_bytes, msg, 4, -1) |
| 3545 | |
| 3546 | @classmethod |
| 3547 | def _is_fd_assigned(cls, fd): |
nothing calls this directly
no test coverage detected