diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2010-11-21 18:08:46 -0300 |
---|---|---|
committer | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2010-11-22 10:43:01 -0300 |
commit | e12197e2822a8cca0022d0843057548246930c16 (patch) | |
tree | d20410a30e1f82b9ff5976bff1a6ef685d84eb1b /tests/QtCore/qobject_property_test.py | |
parent | 3bc0d023c848be0d8e7e7337a92980647e11804a (diff) |
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/QtCore/qobject_property_test.py')
-rw-r--r-- | tests/QtCore/qobject_property_test.py | 14 |
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() |