aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests/t-wrapper.py
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-12 16:29:04 +0000
committerJustus Winter <[email protected]>2016-05-12 16:29:04 +0000
commit11314f0db6e57597e3f56351a86fdb36a7a17dd7 (patch)
treecc5796aba6cbe95d7f2f80a09f07f7b8b1b3271e /lang/python/tests/t-wrapper.py
parentpython: Raise exceptions on write errors. (diff)
downloadgpgme-11314f0db6e57597e3f56351a86fdb36a7a17dd7.tar.gz
gpgme-11314f0db6e57597e3f56351a86fdb36a7a17dd7.zip
python: Share generated methods between objects.justus/pyme3
* lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch the class. * lang/python/tests/t-wrapper.py: Demonstrate the sharing. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rwxr-xr-xlang/python/tests/t-wrapper.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lang/python/tests/t-wrapper.py b/lang/python/tests/t-wrapper.py
index acc2ecfd..fab0d811 100755
--- a/lang/python/tests/t-wrapper.py
+++ b/lang/python/tests/t-wrapper.py
@@ -20,4 +20,6 @@
from pyme import core
d0 = core.Data()
+d0.seek # trigger on-demand-wrapping
assert d0.seek == d0.seek, "Generated wrapper functions are not cached"
+assert hasattr(core.Data, 'seek'), "Generated wrapper functions are not shared"