aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore')
-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 adb1679f3..6e7046d92 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()