[pygobject] unit test for checking ref count of object param in signals
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] unit test for checking ref count of object param in signals
- Date: Mon, 17 Oct 2011 18:47:10 +0000 (UTC)
commit f395fb131caf7ca550acd17138d8061926ef4f92
Author: John (J5) Palmieri <johnp redhat com>
Date: Fri Oct 14 17:19:45 2011 -0400
unit test for checking ref count of object param in signals
https://bugzilla.gnome.org/show_bug.cgi?id=661359
tests/test_everything.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 4a03890..db46482 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -483,3 +483,14 @@ class TestAdvancedInterfaces(unittest.TestCase):
self.assertEquals(ret[0], 51);
self.assertEquals(ret[1], 61);
self.assertEquals(ret[2], 32);
+
+class TestSignals(unittest.TestCase):
+ def test_object_param_signal(self):
+ obj = Everything.TestObj();
+
+ def callback (obj_param):
+ self.assertEquals(obj_param.props.int, 3)
+ self.assertEquals(obj_param.__grefcount__, 2)
+
+ obj.connect('sig-with-obj', callback)
+ obj.emit_sig_with_obj()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]