[Pkg-gnupg-commit] [gpgme] 102/132: python: Remove superfluous initialization.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 26 01:01:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit 4572e8d2ac1d3b45e75ce71265c99e591fbf0e28
Author: Justus Winter <justus at g10code.com>
Date: Mon Mar 20 16:07:07 2017 +0100
python: Remove superfluous initialization.
* lang/python/tests/support.py (init_gpgme): Remove. This is an
remnant from the c tests. Nowadays, the Python bindings initialize
GPGME automagically.
* lang/python/tests/initial.py: Remove call to 'support.init_gpgme'.
* lang/python/tests/t-callbacks.py: Likewise.
* lang/python/tests/t-decrypt-verify.py: Likewise.
* lang/python/tests/t-decrypt.py: Likewise.
* lang/python/tests/t-edit.py: Likewise.
* lang/python/tests/t-encrypt-large.py: Likewise.
* lang/python/tests/t-encrypt-sign.py: Likewise.
* lang/python/tests/t-encrypt-sym.py: Likewise.
* lang/python/tests/t-encrypt.py: Likewise.
* lang/python/tests/t-export.py: Likewise.
* lang/python/tests/t-file-name.py: Likewise.
* lang/python/tests/t-idiomatic.py: Likewise.
* lang/python/tests/t-import.py: Likewise.
* lang/python/tests/t-keylist.py: Likewise.
* lang/python/tests/t-sig-notation.py: Likewise.
* lang/python/tests/t-sign.py: Likewise.
* lang/python/tests/t-signers.py: Likewise.
* lang/python/tests/t-trustlist.py: Likewise.
* lang/python/tests/t-verify.py: Likewise.
* lang/python/tests/t-wait.py: Likewise.
Signed-off-by: Justus Winter <justus at g10code.com>
---
lang/python/tests/initial.py | 2 --
lang/python/tests/support.py | 3 ---
lang/python/tests/t-callbacks.py | 2 --
lang/python/tests/t-decrypt-verify.py | 1 -
lang/python/tests/t-decrypt.py | 1 -
lang/python/tests/t-edit.py | 2 --
lang/python/tests/t-encrypt-large.py | 1 -
lang/python/tests/t-encrypt-sign.py | 1 -
lang/python/tests/t-encrypt-sym.py | 2 --
lang/python/tests/t-encrypt.py | 1 -
lang/python/tests/t-export.py | 1 -
lang/python/tests/t-file-name.py | 1 -
lang/python/tests/t-idiomatic.py | 2 --
lang/python/tests/t-import.py | 1 -
lang/python/tests/t-keylist.py | 1 -
lang/python/tests/t-sig-notation.py | 2 --
lang/python/tests/t-sign.py | 2 --
lang/python/tests/t-signers.py | 2 --
lang/python/tests/t-trustlist.py | 1 -
lang/python/tests/t-verify.py | 2 --
lang/python/tests/t-wait.py | 1 -
21 files changed, 32 deletions(-)
diff --git a/lang/python/tests/initial.py b/lang/python/tests/initial.py
index 4a02762..49e4f82 100755
--- a/lang/python/tests/initial.py
+++ b/lang/python/tests/initial.py
@@ -27,8 +27,6 @@ import support
print("Using gpg module from {0!r}.".format(os.path.dirname(gpg.__file__)))
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
subprocess.check_call([os.path.join(os.getenv('top_srcdir'),
"tests", "start-stop-agent"), "--start"])
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py
index 69aa7a4..80c3a4b 100644
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -39,9 +39,6 @@ def make_filename(name):
def in_srcdir(name):
return os.path.join(os.environ['srcdir'], name)
-def init_gpgme(proto):
- gpg.core.engine_check_version(proto)
-
verbose = int(os.environ.get('verbose', 0)) > 1
def print_data(data):
if verbose:
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py
index eed50bc..ae15787 100755
--- a/lang/python/tests/t-callbacks.py
+++ b/lang/python/tests/t-callbacks.py
@@ -24,8 +24,6 @@ import os
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
c = gpg.Context()
c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK)
diff --git a/lang/python/tests/t-decrypt-verify.py b/lang/python/tests/t-decrypt-verify.py
index 6243167..03bbc4b 100755
--- a/lang/python/tests/t-decrypt-verify.py
+++ b/lang/python/tests/t-decrypt-verify.py
@@ -34,7 +34,6 @@ def check_verify_result(result, summary, fpr, status):
assert sig.validity == gpg.constants.validity.FULL
assert gpg.errors.GPGMEError(sig.validity_reason).getcode() == gpg.errors.NO_ERROR
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
source = gpg.Data(file=support.make_filename("cipher-2.asc"))
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index 1af0562..05b6d8b 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -23,7 +23,6 @@ del absolute_import, print_function, unicode_literals
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
source = gpg.Data(file=support.make_filename("cipher-1.asc"))
diff --git a/lang/python/tests/t-edit.py b/lang/python/tests/t-edit.py
index bd70e7e..7ac3626 100755
--- a/lang/python/tests/t-edit.py
+++ b/lang/python/tests/t-edit.py
@@ -51,8 +51,6 @@ class KeyEditor(object):
return result
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
c = gpg.Context()
c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK)
c.set_passphrase_cb(lambda *args: "abc")
diff --git a/lang/python/tests/t-encrypt-large.py b/lang/python/tests/t-encrypt-large.py
index cdb4a32..5646085 100755
--- a/lang/python/tests/t-encrypt-large.py
+++ b/lang/python/tests/t-encrypt-large.py
@@ -30,7 +30,6 @@ if len(sys.argv) == 2:
else:
nbytes = 100000
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
ntoread = nbytes
diff --git a/lang/python/tests/t-encrypt-sign.py b/lang/python/tests/t-encrypt-sign.py
index 094a2b0..f04783f 100755
--- a/lang/python/tests/t-encrypt-sign.py
+++ b/lang/python/tests/t-encrypt-sign.py
@@ -24,7 +24,6 @@ import sys
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-encrypt-sym.py b/lang/python/tests/t-encrypt-sym.py
index 07e6b62..c15955a 100755
--- a/lang/python/tests/t-encrypt-sym.py
+++ b/lang/python/tests/t-encrypt-sym.py
@@ -24,8 +24,6 @@ import os
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
for passphrase in ("abc", b"abc"):
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-encrypt.py b/lang/python/tests/t-encrypt.py
index 3cbe8f2..921502a 100755
--- a/lang/python/tests/t-encrypt.py
+++ b/lang/python/tests/t-encrypt.py
@@ -23,7 +23,6 @@ del absolute_import, print_function, unicode_literals
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-export.py b/lang/python/tests/t-export.py
index 4927beb..b9d5204 100755
--- a/lang/python/tests/t-export.py
+++ b/lang/python/tests/t-export.py
@@ -23,7 +23,6 @@ del absolute_import, print_function, unicode_literals
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-file-name.py b/lang/python/tests/t-file-name.py
index d12afb8..aab5680 100755
--- a/lang/python/tests/t-file-name.py
+++ b/lang/python/tests/t-file-name.py
@@ -26,7 +26,6 @@ import support
testname = "abcde12345"
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-idiomatic.py b/lang/python/tests/t-idiomatic.py
index 485f048..826bc23 100755
--- a/lang/python/tests/t-idiomatic.py
+++ b/lang/python/tests/t-idiomatic.py
@@ -27,8 +27,6 @@ import tempfile
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
# Both Context and Data can be used as context manager:
with gpg.Context() as c, gpg.Data() as d:
c.get_engine_info()
diff --git a/lang/python/tests/t-import.py b/lang/python/tests/t-import.py
index 5b0576f..e2edf5a 100755
--- a/lang/python/tests/t-import.py
+++ b/lang/python/tests/t-import.py
@@ -67,7 +67,6 @@ def check_result(result, fpr, secret):
assert len(result.imports) == 1 or fpr == result.imports[1].fpr
assert result.imports[0].result == 0
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.op_import(gpg.Data(file=support.make_filename("pubkey-1.asc")))
diff --git a/lang/python/tests/t-keylist.py b/lang/python/tests/t-keylist.py
index 5077ca6..76c793e 100755
--- a/lang/python/tests/t-keylist.py
+++ b/lang/python/tests/t-keylist.py
@@ -23,7 +23,6 @@ del absolute_import, print_function, unicode_literals
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
# Check expration of keys. This test assumes three subkeys of which
diff --git a/lang/python/tests/t-sig-notation.py b/lang/python/tests/t-sig-notation.py
index f1342b1..2277497 100755
--- a/lang/python/tests/t-sig-notation.py
+++ b/lang/python/tests/t-sig-notation.py
@@ -62,8 +62,6 @@ def check_result(result):
assert len(expected_notations) == 0
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
-
source = gpg.Data("Hallo Leute\n")
signed = gpg.Data()
diff --git a/lang/python/tests/t-sign.py b/lang/python/tests/t-sign.py
index 9418ed8..d375729 100755
--- a/lang/python/tests/t-sign.py
+++ b/lang/python/tests/t-sign.py
@@ -53,8 +53,6 @@ def check_result(r, typ):
if signature.fpr != "A0FF4590BB6122EDEF6E3C542D727CC768697734":
fail("Wrong fingerprint reported: {}".format(signature.fpr))
-
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_textmode(True)
c.set_armor(True)
diff --git a/lang/python/tests/t-signers.py b/lang/python/tests/t-signers.py
index 80e797c..5864ee5 100755
--- a/lang/python/tests/t-signers.py
+++ b/lang/python/tests/t-signers.py
@@ -53,8 +53,6 @@ def check_result(r, typ):
"23FD347A419429BACCD5E72D6BC4778054ACD246"):
fail("Wrong fingerprint reported: {}".format(signature.fpr))
-
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_textmode(True)
c.set_armor(True)
diff --git a/lang/python/tests/t-trustlist.py b/lang/python/tests/t-trustlist.py
index 8c5e214..8586596 100755
--- a/lang/python/tests/t-trustlist.py
+++ b/lang/python/tests/t-trustlist.py
@@ -23,7 +23,6 @@ del absolute_import, print_function, unicode_literals
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
def dump_item(item):
diff --git a/lang/python/tests/t-verify.py b/lang/python/tests/t-verify.py
index f18e1dd..0347638 100755
--- a/lang/python/tests/t-verify.py
+++ b/lang/python/tests/t-verify.py
@@ -97,8 +97,6 @@ def check_result(result, summary, validity, fpr, status, notation):
sig.validity, validity)
assert gpg.errors.GPGMEError(sig.validity_reason).getcode() == gpg.errors.NO_ERROR
-
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
diff --git a/lang/python/tests/t-wait.py b/lang/python/tests/t-wait.py
index b1f2043..0c403fa 100755
--- a/lang/python/tests/t-wait.py
+++ b/lang/python/tests/t-wait.py
@@ -24,7 +24,6 @@ import time
import gpg
import support
-support.init_gpgme(gpg.constants.protocol.OpenPGP)
c = gpg.Context()
c.set_armor(True)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list