def METHOD_NAME(self):
    with open(TESTFN, 'wb') as stream:
        stream.write(self.testdata)
    with UnseekableIO(TESTFN, 'rb') as stream:
        with self.assertRaises(io.UnsupportedOperation):
            imghdr.what(stream)