':py:obj:`crypto.dump_privatekey` should raise an error when the passphrase
provided by the callback is too long, not silently truncate it.'

def test_dump_privatekey_passphraseCallbackLength(self):

    def cb(ignored):
        return ('a' * 1025)
    key = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
    self.assertRaises(ValueError, dump_privatekey, FILETYPE_PEM, key, GOOD_CIPHER, cb)
