def test_open(self, pipe): pipe.return_value = 0, 1 reader, writer = Pipe._open() self.assertEqual(reader.fd, 0) self.assertEqual(writer.fd, 1)