':py:obj:`dump_privatekey` should not overwrite the exception raised
by the passphrase callback.'

def test_dump_privatekey_passphrase_exception(self):

    def cb(ignored):
        raise ArithmeticError
    key = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
    self.assertRaises(ArithmeticError, dump_privatekey, FILETYPE_PEM, key, GOOD_CIPHER, cb)
