Ben McGinnes
5facba45c8
Python bindings tests: Near PEP8 compliance
...
* PEP8 compliance for the vast majoeity of the tests.
2018-08-18 20:29:14 +10:00
Justus Winter
159505a288
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>
2017-03-30 15:06:10 +02:00
Justus Winter
9350168a1e
python: Fix using strings as commands in the assuan protocol.
...
* lang/python/gpg/core.py (Context.assuan_transact): Fix testing
whether the command is a string on Python2.
* lang/python/tests/t-protocol-assuan.py: Improve the test to detect
this problem.
Signed-off-by: Justus Winter <justus@g10code.com>
2017-02-17 12:10:34 +01:00
Justus Winter
4b32643450
python: Use vanity modules for constants in tests and examples.
...
* lang/python/gpg/constants/sig/notation.py: New file.
* lang/python/gpg/constants/sig/__init__.py: Import new module.
* lang/python/examples/assuan.py: Use more specific module for
constants, e.g. 'protocol.ASSUAN' instead of 'PROTOCOL_ASSUAN'.
* lang/python/examples/testCMSgetkey.py: Likewise.
* lang/python/tests/initial.py: Likewise.
* 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-protocol-assuan.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@g10code.com>
2016-10-31 15:42:35 +01:00
Daniel Kahn Gillmor
2fac017618
python: Rename Python module from PyME to gpg.
...
This follows weeks of discussion on the gnupg-devel mailing list.
Hopefully it will make it easier for people using Python to use GnuPG
in the future.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2016-10-31 15:42:27 +01:00
Justus Winter
dc23fdf555
python: Import from __future__ to align behavior of Python 2.7.
...
--
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-14 12:15:57 +02:00
Justus Winter
3b37c4efcf
python: Use more generic shebang.
...
--
Signed-off-by: Justus Winter <justus@g10code.com>
2016-09-14 12:15:57 +02:00
Justus Winter
de69fa496c
python: Support the Assuan engine.
...
* lang/python/gpgme.i: Add typemaps for the Assuan protocol callbacks.
* lang/python/helpers.c (_pyme_assuan_{data,inquire,status}_cb): New
functions.
* lang/python/private.h (_pyme_assuan_{data,inquire,status}_cb): New
prototypes.
* lang/python/pyme/core.py (Context.assuan_transact): New method.
* lang/python/pyme/util.py (percent_escape): New function.
* lang/python/tests/Makefile.am (py_tests): Add new test.
* lang/python/tests/t-protocol-assuan.py: New file.
Signed-off-by: Justus Winter <justus@g10code.com>
2016-07-28 14:23:07 +02:00