summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-21 18:08:46 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-11-22 10:43:01 -0300
commite12197e2822a8cca0022d0843057548246930c16 (patch)
treed20410a30e1f82b9ff5976bff1a6ef685d84eb1b /tests
parent3bc0d023c848be0d8e7e7337a92980647e11804a (diff)
downloadpyside-e12197e2822a8cca0022d0843057548246930c16.tar.gz
pyside-e12197e2822a8cca0022d0843057548246930c16.tar.xz
pyside-e12197e2822a8cca0022d0843057548246930c16.zip
Fix generated property flags on metaobject.
Fixes bug #478 Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/qobject_property_test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/QtCore/qobject_property_test.py b/tests/QtCore/qobject_property_test.py
index adb1679..6e7046d 100644
--- a/tests/QtCore/qobject_property_test.py
+++ b/tests/QtCore/qobject_property_test.py
@@ -188,6 +188,20 @@ class PropertyWithNotify(unittest.TestCase):
obj.myProperty = 10
self.assert_(self.called_)
+class MetaPropertyTest(unittest.TestCase):
+ def testConstant(self):
+ obj = MyObject()
+ mo = obj.metaObject()
+ self.assertEqual(mo.propertyCount(), 2)
+ p = mo.property(1)
+ self.assertTrue(p.isConstant())
+
+ obj = MyObjectWithNotifyProperty()
+ mo = obj.metaObject()
+ self.assertEqual(mo.propertyCount(), 2)
+ p = mo.property(1)
+ self.assertFalsee(p.isConstant())
+
if __name__ == '__main__':
unittest.main()