':py:obj:`Context.use_privatekey_file` propagates any exception raised by the
passphrase callback.'

def test_passwd_callback_exception(self):

    pemFile = self._write_encrypted_pem(b('monkeys    are    nice'))
    def passphraseCallback(maxlen, verify, extra):
        raise RuntimeError('Sorry,    I    am    a    fail.')
    context = Context(TLSv1_METHOD)
    context.set_passwd_cb(passphraseCallback)
    self.assertRaises(RuntimeError, context.use_privatekey_file, pemFile)
