From 5facba45c83f7daaacc49e66306e13a35aeb74be Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Sat, 18 Aug 2018 20:29:14 +1000 Subject: Python bindings tests: Near PEP8 compliance * PEP8 compliance for the vast majoeity of the tests. --- lang/python/tests/t-sign.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lang/python/tests/t-sign.py') diff --git a/lang/python/tests/t-sign.py b/lang/python/tests/t-sign.py index d3757294..3ad05e8e 100755 --- a/lang/python/tests/t-sign.py +++ b/lang/python/tests/t-sign.py @@ -18,15 +18,18 @@ # License along with this program; if not, see . from __future__ import absolute_import, print_function, unicode_literals -del absolute_import, print_function, unicode_literals import os import gpg import support +del absolute_import, print_function, unicode_literals + + def fail(msg): raise RuntimeError(msg) + def check_result(r, typ): if r.invalid_signers: fail("Invalid signer found: {}".format(r.invalid_signers.fpr)) @@ -43,16 +46,15 @@ def check_result(r, typ): signature.pubkey_algo)) if signature.hash_algo != gpg.constants.md.SHA1: - fail("Wrong hash algorithm reported: {}".format( - signature.hash_algo)) + fail("Wrong hash algorithm reported: {}".format(signature.hash_algo)) if signature.sig_class != 1: - fail("Wrong signature class reported: {}".format( - signature.sig_class)) + fail("Wrong signature class reported: {}".format(signature.sig_class)) if signature.fpr != "A0FF4590BB6122EDEF6E3C542D727CC768697734": fail("Wrong fingerprint reported: {}".format(signature.fpr)) + c = gpg.Context() c.set_textmode(True) c.set_armor(True) -- cgit v1.2.3