aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/pyme/core.py
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-27 13:58:23 +0000
committerJustus Winter <[email protected]>2016-05-27 15:24:12 +0000
commit3915842657f0849a038752fd7445f96081a89dd9 (patch)
treef86d86e29c5b504d94f4c56e5e9b6123afa233d1 /lang/python/pyme/core.py
parentsrc: Fix typo. (diff)
downloadgpgme-3915842657f0849a038752fd7445f96081a89dd9.tar.gz
gpgme-3915842657f0849a038752fd7445f96081a89dd9.zip
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 <[email protected]>
Diffstat (limited to 'lang/python/pyme/core.py')
-rw-r--r--lang/python/pyme/core.py11
1 files changed, 6 insertions, 5 deletions
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):