python: Fix skipping tests if running with GnuPG < 2.1.12.
* final.py: Import 'support.py' for the side-effect of checking the
GnuPG version.
* t-data.py: Likewise.
* t-protocol-assuan.py: Likewise.
* t-wrapper.py: Likewise.
* t-callbacks.py: Avoid warning about 'support' being unused.
* t-edit.py: Likewise.
* t-encrypt-sym.py: Likewise.
* t-file-name.py: Likewise.
* t-idiomatic.py: Likewise.
* t-sig-notation.py: Likewise.
* t-trustlist.py: Likewise.
* t-verify.py: Likewise.
* t-wait.py: Likewise.
* t-keylist-from-data.py: Trim unused imports.
GnuPG-bug-id: 3008
Fixes-commit: 348da58fe0
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
2c063a8d60
commit
159505a288
@ -22,6 +22,8 @@ del absolute_import, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
subprocess.check_call([os.path.join(os.getenv('top_srcdir'),
|
||||
"tests", "start-stop-agent"), "--stop"])
|
||||
|
@ -23,8 +23,7 @@ del absolute_import, print_function, unicode_literals
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
|
||||
support.assert_gpg_version()
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
c = gpg.Context()
|
||||
c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK)
|
||||
|
@ -24,6 +24,8 @@ import io
|
||||
import os
|
||||
import tempfile
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
data = gpg.Data('Hello world!')
|
||||
assert data.read() == b'Hello world!'
|
||||
|
@ -25,8 +25,7 @@ import sys
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
|
||||
support.assert_gpg_version()
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
class KeyEditor(object):
|
||||
def __init__(self):
|
||||
|
@ -23,8 +23,7 @@ del absolute_import, print_function, unicode_literals
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
|
||||
support.assert_gpg_version()
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
for passphrase in ("abc", b"abc"):
|
||||
c = gpg.Context()
|
||||
|
@ -23,6 +23,7 @@ del absolute_import, print_function, unicode_literals
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
testname = "abcde12345"
|
||||
|
||||
|
@ -26,6 +26,7 @@ import os
|
||||
import tempfile
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
# Both Context and Data can be used as context manager:
|
||||
with gpg.Context() as c, gpg.Data() as d:
|
||||
|
@ -20,8 +20,6 @@
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
del absolute_import, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
import gpg
|
||||
import support
|
||||
|
||||
|
@ -21,6 +21,8 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||
del absolute_import, print_function, unicode_literals
|
||||
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
with gpg.Context(protocol=gpg.constants.protocol.ASSUAN) as c:
|
||||
# Do nothing.
|
||||
|
@ -23,6 +23,7 @@ del absolute_import, print_function, unicode_literals
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
expected_notations = {
|
||||
"laughing@me": ("Just Squeeze Me", gpg.constants.sig.notation.HUMAN_READABLE),
|
||||
|
@ -22,6 +22,7 @@ del absolute_import, print_function, unicode_literals
|
||||
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
c = gpg.Context()
|
||||
|
||||
|
@ -24,6 +24,7 @@ import sys
|
||||
import os
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
test_text1 = b"Just GNU it!\n"
|
||||
test_text1f= b"Just GNU it?\n"
|
||||
|
@ -23,6 +23,7 @@ del absolute_import, print_function, unicode_literals
|
||||
import time
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
c = gpg.Context()
|
||||
c.set_armor(True)
|
||||
|
@ -18,6 +18,8 @@
|
||||
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import gpg
|
||||
import support
|
||||
_ = support # to appease pyflakes.
|
||||
|
||||
d0 = gpg.Data()
|
||||
d0.seek # trigger on-demand-wrapping
|
||||
|
Loading…
Reference in New Issue
Block a user