def METHOD_NAME(self):
    b = b'RIFF' + struct.pack('<L', 4) + b'SPAM'
    with self.assertRaisesRegex(wave.Error,
                                'not a WAVE file'):
        wave.open(io.BytesIO(b))