diff options
Diffstat (limited to 'tests/signals')
-rw-r--r-- | tests/signals/decorators_test.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/signals/decorators_test.py b/tests/signals/decorators_test.py index b25e12994..da9c1cae4 100644 --- a/tests/signals/decorators_test.py +++ b/tests/signals/decorators_test.py @@ -32,6 +32,10 @@ class MyObject(QObject): def mySlot5(self): self._slotCalledCount = self._slotCalledCount + 1 + @Slot(result=QObject) + def mySlot6(self): + self._slotCalledCount = self._slotCalledCount + 1 + class StaticMetaObjectTest(unittest.TestCase): def testSignalPropagation(self): @@ -56,6 +60,12 @@ class StaticMetaObjectTest(unittest.TestCase): m = mo.method(i) self.assertEqual(m.typeName(), "int") + def testResultObject(self): + o = MyObject() + mo = o.metaObject() + i = mo.indexOfSlot('mySlot6()') + m = mo.method(i) + self.assertEqual(m.typeName(), "QObject*") class SlotWithoutArgs(unittest.TestCase): |