Created unit test for bug #726.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
Renato Filho 2011-03-21 10:09:51 -03:00
commit 2bd54857ed
4 changed files with 123 additions and 0 deletions

View file

@ -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):