From 599dbc210b59f58018c89ebb2d34b2255ea61d05 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sat, 16 Jun 2007 11:54:03 +0000 Subject: Support type=GObject or type=TYPE_OBJECT in the new properties API. svn path=/trunk/; revision=675 --- tests/test_properties.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/test_properties.py') diff --git a/tests/test_properties.py b/tests/test_properties.py index 3996b8d..a82c1fb 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -290,3 +290,17 @@ class TestProperty(unittest.TestCase): o1.prop = 'value' self.assertEqual(o1.prop, 'value') self.assertEqual(o2.prop, 'default') + + def testObjectProperty(self): + class PropertyObject(GObject): + obj = gobject.property(type=GObject) + + pobj1 = PropertyObject() + obj1_hash = hash(pobj1) + pobj2 = PropertyObject() + + pobj2.obj = pobj1 + del pobj1 + pobj1 = pobj2.obj + self.assertEqual(hash(pobj1), obj1_hash) + -- cgit