(self)
| 3798 | p.join() |
| 3799 | |
| 3800 | def test_sendbytes(self): |
| 3801 | if self.TYPE != 'processes': |
| 3802 | self.skipTest('test not appropriate for {}'.format(self.TYPE)) |
| 3803 | |
| 3804 | msg = latin('abcdefghijklmnopqrstuvwxyz') |
| 3805 | a, b = self.Pipe() |
| 3806 | |
| 3807 | a.send_bytes(msg) |
| 3808 | self.assertEqual(b.recv_bytes(), msg) |
| 3809 | |
| 3810 | a.send_bytes(msg, 5) |
| 3811 | self.assertEqual(b.recv_bytes(), msg[5:]) |
| 3812 | |
| 3813 | a.send_bytes(msg, 7, 8) |
| 3814 | self.assertEqual(b.recv_bytes(), msg[7:7+8]) |
| 3815 | |
| 3816 | a.send_bytes(msg, 26) |
| 3817 | self.assertEqual(b.recv_bytes(), latin('')) |
| 3818 | |
| 3819 | a.send_bytes(msg, 26, 0) |
| 3820 | self.assertEqual(b.recv_bytes(), latin('')) |
| 3821 | |
| 3822 | self.assertRaises(ValueError, a.send_bytes, msg, 27) |
| 3823 | |
| 3824 | self.assertRaises(ValueError, a.send_bytes, msg, 22, 5) |
| 3825 | |
| 3826 | self.assertRaises(ValueError, a.send_bytes, msg, 26, 1) |
| 3827 | |
| 3828 | self.assertRaises(ValueError, a.send_bytes, msg, -1) |
| 3829 | |
| 3830 | self.assertRaises(ValueError, a.send_bytes, msg, 4, -1) |
| 3831 | |
| 3832 | @classmethod |
| 3833 | def _is_fd_assigned(cls, fd): |
nothing calls this directly
no test coverage detected