aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-04-20 19:56:45 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-04-22 18:20:04 -0300
commitb24af354ea6f05253150179467aa77e7c999611e (patch)
treede838af180926b7bdfd9e912d515842410b06491 /tests/samplebinding
parentf0f1aa01139a073430eb2c5feb767dedc45d3b4f (diff)
Fixed argument policy propagate.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rwxr-xr-xtests/samplebinding/objecttypelayout_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/samplebinding/objecttypelayout_test.py b/tests/samplebinding/objecttypelayout_test.py
index 444ee8b5d..1e14e5a4a 100755
--- a/tests/samplebinding/objecttypelayout_test.py
+++ b/tests/samplebinding/objecttypelayout_test.py
@@ -35,6 +35,17 @@ from sample import *
class ObjectTypeLayoutTest(unittest.TestCase):
'''Test cases for ObjectTypeLayout class.'''
+ def testOwnershipOverride(self):
+ l = ObjectTypeLayout()
+
+ o1 = ObjectType(l)
+ o1.setObjectName('o1')
+
+ self.assertEqual(sys.getrefcount(o1), 3)
+ l.takeChild('o1')
+ self.assertEqual(sys.getrefcount(o1), 2)
+
+
def testSetNullLayout(self):
'''ObjectType.setLayout(0).'''
o2 = ObjectType()
@@ -281,7 +292,6 @@ class ObjectTypeLayoutTest(unittest.TestCase):
self.assertRaises(RuntimeError, l1.objectName)
self.assertRaises(RuntimeError, l2.objectName)
-
if __name__ == '__main__':
unittest.main()