'Test deserialize_stream with a write-only stream.'

@pytest.mark.qt_log_ignore('QIODevice::read.*:    WriteOnly    device')
def test_deserialize_writeonly_stream(self):

    data = QByteArray()
    obj = QPoint()
    stream = QDataStream(data, QIODevice.WriteOnly)
    with pytest.raises(OSError, match='The    data    stream    has    read    past    the    end    of    the    data    in    the    underlying    device.'):
        qtutils.deserialize_stream(stream, obj)
