diff options
author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-06-16 11:54:03 +0000 |
---|---|---|
committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-06-16 11:54:03 +0000 |
commit | 599dbc210b59f58018c89ebb2d34b2255ea61d05 (patch) | |
tree | 661752e56a594707662f8c262f374bcaadea6df9 /tests/test_properties.py | |
parent | 00b12c72912c53aa541add7914a2c25784fb07e1 (diff) | |
download | pygobject-599dbc210b59f58018c89ebb2d34b2255ea61d05.tar.gz pygobject-599dbc210b59f58018c89ebb2d34b2255ea61d05.tar.xz pygobject-599dbc210b59f58018c89ebb2d34b2255ea61d05.zip |
Support type=GObject or type=TYPE_OBJECT in the new properties API.
svn path=/trunk/; revision=675
Diffstat (limited to 'tests/test_properties.py')
-rw-r--r-- | tests/test_properties.py | 14 |
1 files changed, 14 insertions, 0 deletions
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) + |