aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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 bc38dbb18..721450582 100644
--- a/tests/QtCore/qobject_property_test.py
+++ b/tests/QtCore/qobject_property_test.py
@@ -36,6 +36,12 @@ class MyObject(QObject):
pp = Property(int, readPP, constant=True)
+class MySubObject(MyObject):
+ pass
+
+class MyMultipleObject(MyObject, object):
+ pass
+
class MyObjectWithNotifyProperty(QObject):
def __init__(self, parent=None):
QObject.__init__(self, parent)
@@ -137,6 +143,14 @@ class PropertyCase(unittest.TestCase):
self.assertFalse(obj.property('rect') is rect)
self.assertEqual(obj.property('rect'), rect)
+ def testSubClassProperty(self):
+ o = MyObject()
+ self.assertEqual(o.property('pp'), 42)
+ so = MySubObject()
+ self.assertEqual(so.property('pp'), 42)
+ mo = MyMultipleObject()
+ self.assertEqual(mo.property('pp'), 42)
+
class PropertyWithConstructorCase(unittest.TestCase):
'''Test case for QObject properties set using named arguments in the constructor.'''