--- pygpgme-0.3.orig/tests/test_encrypt_decrypt.py
+++ pygpgme-0.3/tests/test_encrypt_decrypt.py
@@ -131,6 +131,8 @@
         def passphrase(uid_hint, passphrase_info, prev_was_bad, fd):
             os.write(fd, b'Symmetric passphrase\n')
         ctx = gpgme.Context()
+        ctx.set_engine_info(gpgme.PROTOCOL_OpenPGP, '/usr/bin/gpg',
+            os.environ['GNUPGHOME'])
         ctx.armor = True
         ctx.passphrase_cb = passphrase
         ctx.encrypt(None, 0, plaintext, ciphertext)
--- pygpgme-0.3.orig/tests/test_passphrase.py
+++ pygpgme-0.3/tests/test_passphrase.py
@@ -32,6 +32,8 @@
 
     def test_sign_without_passphrase_cb(self):
         ctx = gpgme.Context()
+        ctx.set_engine_info(gpgme.PROTOCOL_OpenPGP, '/usr/bin/gpg',
+            os.environ['GNUPGHOME'])
         key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
         ctx.signers = [key]
         plaintext = BytesIO(b'Hello World\n')
@@ -53,6 +55,8 @@
 
     def test_sign_with_passphrase_cb(self):
         ctx = gpgme.Context()
+        ctx.set_engine_info(gpgme.PROTOCOL_OpenPGP, '/usr/bin/gpg',
+            os.environ['GNUPGHOME'])
         key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
         ctx.signers = [key]
         ctx.passphrase_cb = self.passphrase_cb
