'Test serialize_stream with a read-only stream.'

@pytest.mark.qt_log_ignore('^QIODevice::write.*:    ReadOnly    device')
def test_serialize_readonly_stream(self):

    data = QByteArray()
    stream = QDataStream(data, QIODevice.ReadOnly)
    with pytest.raises(OSError, match='The    data    stream    cannot    write    to    the    underlying    device.'):
        qtutils.serialize_stream(stream, QPoint())
