def METHOD_NAME(self):
    stream = open(self.testfile, 'rb')
    stream.close()
    with self.assertRaises(ValueError) as cm:
        imghdr.what(stream)
    stream = io.BytesIO(self.testdata)
    stream.close()
    with self.assertRaises(ValueError) as cm:
        imghdr.what(stream)