def test_passwd_callback_non_string(self, tmpfile):
    '\n        `Context.use_privatekey_file` raises `OpenSSL.SSL.Error` if the\n        passphrase callback returns a true non-string value.\n        '
    pemFile = self._write_encrypted_pem(b'monkeys are nice', tmpfile)

    def passphraseCallback(maxlen, verify, extra):
        return 10
    context = Context(TLSv1_METHOD)
    context.set_passwd_cb(passphraseCallback)
    with pytest.raises(ValueError):
        context.use_privatekey_file(pemFile)
`Context.use_privatekey_file` raises `OpenSSL.SSL.Error` if the
passphrase callback returns a true non-string value.
def test_passwd_callback_non_string(self, tmpfile):
    '\n        `Context.use_privatekey_file` raises `OpenSSL.SSL.Error` if the\n        passphrase callback returns a true non-string value.\n        '
    pemFile = self._write_encrypted_pem(b'monkeys are nice', tmpfile)

    def passphraseCallback(maxlen, verify, extra):
        return 10
    context = Context(TLSv1_METHOD)
    context.set_passwd_cb(passphraseCallback)
    with pytest.raises(ValueError):
        context.use_privatekey_file(pemFile)