From 464d404c8816fc93baf945816c93e86bdeb0ea39 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 18 May 2016 15:33:36 +0200 Subject: python: Add more tests. * lang/python/tests/Makefile.am (py_tests): Add new tests. * lang/python/tests/support.py (print_data): New function. * lang/python/tests/t-decrypt.py: Use new function. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-sign.py: New file. * lang/python/tests/t-encrypt-sym.py: Likewise. Signed-off-by: Justus Winter --- lang/python/tests/support.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lang/python/tests/support.py') diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py index 36b3c888..a57d5816 100644 --- a/lang/python/tests/support.py +++ b/lang/python/tests/support.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, see . +import sys import os from pyme import core @@ -24,3 +25,8 @@ def make_filename(name): def init_gpgme(proto): core.check_version() core.engine_check_version(proto) + +def print_data(data): + if int(os.environ.get('verbose', 0)) > 1: + data.seek(0, os.SEEK_SET) + sys.stdout.buffer.write(data.read()) -- cgit v1.2.3