'Test serialize_stream with an error already set.'

def test_serialize_pre_error_mock(self, stream_mock):

    stream_mock.status.return_value = QDataStream.ReadCorruptData
    with pytest.raises(OSError, match='The    data    stream    has    read    corrupt    data.'):
        qtutils.serialize_stream(stream_mock, QPoint())
    assert (not stream_mock.__lshift__.called)
