Fix generated property flags on metaobject.
Fixes bug #478 Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
3bc0d023c8
commit
e12197e282
4 changed files with 52 additions and 30 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue