From 3915842657f0849a038752fd7445f96081a89dd9 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 27 May 2016 15:58:23 +0200 Subject: python: Port more tests. * lang/python/pyme/core.py (Data._error_check): Add 'gpgme_data_get_file_name' to the list of functions not returning an error code. * lang/python/tests/Makefile.am (pytests): Add new tests. * lang/python/tests/support.py (verbose): New variable. * lang/python/tests/t-data.py: Test setting and getting the filename. * lang/python/tests/t-encrypt-large.py: New file. * lang/python/tests/t-file-name.py: Likewise. * lang/python/tests/t-trustlist.py: Likewise. Signed-off-by: Justus Winter --- lang/python/pyme/core.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lang/python/pyme/core.py') diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py index e89c1812..cc262c95 100644 --- a/lang/python/pyme/core.py +++ b/lang/python/pyme/core.py @@ -363,11 +363,12 @@ class Data(GpgmeWrapper): def _errorcheck(self, name): """This function should list all functions returning gpgme_error_t""" - if name == 'gpgme_data_release_and_get_mem' or \ - name == 'gpgme_data_get_encoding' or \ - name == 'gpgme_data_seek': - return 0 - return 1 + return name not in { + 'gpgme_data_release_and_get_mem', + 'gpgme_data_get_encoding', + 'gpgme_data_seek', + 'gpgme_data_get_file_name', + } def __init__(self, string=None, file=None, offset=None, length=None, cbs=None, copy=True): -- cgit v1.2.3