'Can we write a RGBA mode file to webp without error.
Does it have the bits we expect?'

def test_write_rgba(self):

    temp_file = self.tempfile('temp.webp')
    pil_image = Image.new('RGBA', (10, 10), (255, 0, 0, 20))
    pil_image.save(temp_file)
    if _webp.WebPDecoderBuggyAlpha(self):
        return
    image = Image.open(temp_file)
    image.load()
    self.assertEqual(image.mode, 'RGBA')
    self.assertEqual(image.size, (10, 10))
    self.assertEqual(image.format, 'WEBP')
    image.load()
    image.getdata()
    if (_webp.WebPDecoderVersion(self) <= 513):
        self.assert_image_similar(image, pil_image, 3.0)
    else:
        self.assert_image_similar(image, pil_image, 1.0)
