aboutsummaryrefslogtreecommitdiffstats
path: root/tests/signals
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-03-21 10:09:51 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:04 -0300
commit69abc806ec895239154287779dca9c4cac8adcea (patch)
tree9e5e22a24afc9a90d0d62099a128802827a66c0a /tests/signals
parent258995d03cd0cf81288917e073056d64844c003d (diff)
Created unit test for bug #726.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'tests/signals')
-rw-r--r--tests/signals/decorators_test.py10
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):