diff options
author | Justus Winter <[email protected]> | 2016-06-06 10:49:11 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-07-12 16:34:12 +0000 |
commit | 1bff47ee58bcf9d0016fb7ac7e37cbf075abd059 (patch) | |
tree | 9e0565d56db6da7b623c02e4d4b9521a0bf89fed /lang/python/pyme/core.py | |
parent | python: Improve python packaging. (diff) | |
download | gpgme-1bff47ee58bcf9d0016fb7ac7e37cbf075abd059.tar.gz gpgme-1bff47ee58bcf9d0016fb7ac7e37cbf075abd059.zip |
python: Port more tests.
* lang/python/pyme/core.py (Context.op_keylist_all): Add missing
'op_keylist_end'.
(Context.op_trustlist_all): Fix function. Add missing
'op_trustlist_end'.
* lang/python/tests/Makefile.am (pytests): Add new files.
* lang/python/tests/t-import.py: New file.
* lang/python/tests/t-keylist.py: Likewise.
* lang/python/tests/t-trustlist.py: Check alternate interface.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/pyme/core.py')
-rw-r--r-- | lang/python/pyme/core.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py index 09f71a1a..e5ccf7cd 100644 --- a/lang/python/pyme/core.py +++ b/lang/python/pyme/core.py @@ -255,6 +255,7 @@ class Context(GpgmeWrapper): while key: yield key key = self.op_keylist_next() + self.op_keylist_end() def op_keylist_next(self): """Returns the next key in the list created @@ -285,10 +286,11 @@ class Context(GpgmeWrapper): def op_trustlist_all(self, *args, **kwargs): self.op_trustlist_start(*args, **kwargs) - trust = self.ctx.op_trustlist_next() + trust = self.op_trustlist_next() while trust: yield trust - trust = self.ctx.op_trustlist_next() + trust = self.op_trustlist_next() + self.op_trustlist_end() def op_trustlist_next(self): """Returns the next trust item in the list created |