aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests/t-idiomatic.py
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-08-09 00:36:04 +0000
committerNIIBE Yutaka <[email protected]>2022-08-09 00:57:28 +0000
commitf8d99bb9e4a7f6229c19c4fbd951ccad6fa97bde (patch)
tree1019c906b7d6f85a3b659210fad60ac3c36f4207 /lang/python/tests/t-idiomatic.py
parentpython: Don't access gpgme with wrapped=None. (diff)
downloadgpgme-f8d99bb9e4a7f6229c19c4fbd951ccad6fa97bde.tar.gz
gpgme-f8d99bb9e4a7f6229c19c4fbd951ccad6fa97bde.zip
python: Don't call __del__ from __exit__ method.
* lang/python/src/core.py (Context, Data): Don't call __del__ from __exit__ method, as the object may be still in use. * lang/python/tests/t-idiomatic.py: Fix the test. -- GnuPG-bug-id: 6060 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'lang/python/tests/t-idiomatic.py')
-rwxr-xr-xlang/python/tests/t-idiomatic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lang/python/tests/t-idiomatic.py b/lang/python/tests/t-idiomatic.py
index bc05e6c6..faa41906 100755
--- a/lang/python/tests/t-idiomatic.py
+++ b/lang/python/tests/t-idiomatic.py
@@ -35,6 +35,9 @@ with gpg.Context() as c, gpg.Data() as d:
d.write(b"Halloechen")
leak_c = c
leak_d = d
+
+leak_c.__del__()
+leak_d.__del__()
assert leak_c.wrapped is None
assert leak_d.wrapped is None