Created unit test for bug #726.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
parent
8ce3644a13
commit
2bd54857ed
4 changed files with 123 additions and 0 deletions
|
|
@ -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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue