diff options
author | Ben McGinnes <[email protected]> | 2018-08-18 10:29:14 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-08-18 10:29:14 +0000 |
commit | 5facba45c83f7daaacc49e66306e13a35aeb74be (patch) | |
tree | baf659036cb95f3d5c75babdc242a4629c864616 /lang/python/tests/t-edit.py | |
parent | Python bindings examples: PEP8 conpliance (diff) | |
download | gpgme-5facba45c83f7daaacc49e66306e13a35aeb74be.tar.gz gpgme-5facba45c83f7daaacc49e66306e13a35aeb74be.zip |
Python bindings tests: Near PEP8 compliance
* PEP8 compliance for the vast majoeity of the tests.
Diffstat (limited to 'lang/python/tests/t-edit.py')
-rwxr-xr-x | lang/python/tests/t-edit.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lang/python/tests/t-edit.py b/lang/python/tests/t-edit.py index b1075a96..cbc17d95 100755 --- a/lang/python/tests/t-edit.py +++ b/lang/python/tests/t-edit.py @@ -19,13 +19,15 @@ # License along with this program; if not, see <http://www.gnu.org/licenses/>. from __future__ import absolute_import, print_function, unicode_literals -del absolute_import, print_function, unicode_literals import sys import os import gpg import support -_ = support # to appease pyflakes. +_ = support # to appease pyflakes. + +del absolute_import, print_function, unicode_literals + class KeyEditor(object): def __init__(self): @@ -47,11 +49,12 @@ class KeyEditor(object): result = None if self.verbose: - sys.stderr.write("Code: {}, args: {!r}, Returning: {!r}\n" - .format(status, args, result)) + sys.stderr.write("Code: {}, args: {!r}, Returning: {!r}\n".format( + status, args, result)) return result + c = gpg.Context() c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK) c.set_passphrase_cb(lambda *args: "abc") @@ -59,13 +62,15 @@ c.set_armor(True) # The deprecated interface. editor = KeyEditor() -c.interact(c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False), - editor.edit_fnc) +c.interact( + c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False), + editor.edit_fnc) assert editor.done # The deprecated interface. sink = gpg.Data() editor = KeyEditor() -c.op_edit(c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False), - editor.edit_fnc, sink, sink) +c.op_edit( + c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False), + editor.edit_fnc, sink, sink) assert editor.done |