[pygobject] tests: Add test for an owned boxed struct passed in a callback
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Add test for an owned boxed struct passed in a callback
- Date: Mon, 27 Jan 2014 23:16:27 +0000 (UTC)
commit e79d2acc54c1e3b052835de5de20feb0b7069476
Author: Mike Gorse <mgorse suse com>
Date: Fri Jan 24 05:17:06 2014 -0600
tests: Add test for an owned boxed struct passed in a callback
https://bugzilla.gnome.org/show_bug.cgi?id=722899
tests/test_gi.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 3af086d..8bd4027 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -2266,6 +2266,17 @@ class TestPythonGObject(unittest.TestCase):
obj = self.ErrorObject()
self.assertEqual(obj.vfunc_return_value_only(), 0)
+ def test_callback_owned_box(self):
+ def callback(box, data):
+ self.box = box
+
+ def nop_callback(box, data):
+ pass
+
+ GIMarshallingTests.callback_owned_boxed(callback, None)
+ GIMarshallingTests.callback_owned_boxed(nop_callback, None)
+ self.assertEqual(self.box.long_, 1)
+
class TestMultiOutputArgs(unittest.TestCase):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]