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-protocol-assuan.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-protocol-assuan.py')
-rwxr-xr-x | lang/python/tests/t-protocol-assuan.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lang/python/tests/t-protocol-assuan.py b/lang/python/tests/t-protocol-assuan.py index 8da50351..c337c3b7 100755 --- a/lang/python/tests/t-protocol-assuan.py +++ b/lang/python/tests/t-protocol-assuan.py @@ -18,20 +18,21 @@ # 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 gpg import support -_ = support # to appease pyflakes. +_ = support # to appease pyflakes. + +del absolute_import, print_function, unicode_literals with gpg.Context(protocol=gpg.constants.protocol.ASSUAN) as c: # Do nothing. err = c.assuan_transact('nop') - assert err == None + assert err is None err = c.assuan_transact(b'NOP') - assert err == None + assert err is None err = c.assuan_transact(['NOP']) - assert err == None + assert err is None err = c.assuan_transact('idontexist') assert err.getsource() == gpg.errors.SOURCE_GPGAGENT @@ -41,6 +42,7 @@ with gpg.Context(protocol=gpg.constants.protocol.ASSUAN) as c: c.assuan_transact(['GET_CONFIRMATION', 'Hello there']) data = [] + def data_cb(line): data.append(line) @@ -57,6 +59,7 @@ with gpg.Context(protocol=gpg.constants.protocol.ASSUAN) as c: # XXX HELP sends status lines if we could use ASSUAN_CONVEY_COMMENTS. status = [] + def status_cb(line, args): status.append((line, args)) |