diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-04-09 16:51:37 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-04-12 16:04:40 -0300 |
commit | 542095e1ee72e32e5b935fb20c52d17d54903f79 (patch) | |
tree | 84ab0e5e65cdc00af11d4902b340f64bd8e3b976 /tests | |
parent | 9ca3e6148aafc852c72302a2d3401a2dff56abd2 (diff) |
Fixed signal emission with pythonic signalture.
Created unittest.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/signals/pysignal_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/signals/pysignal_test.py b/tests/signals/pysignal_test.py index 5f7fc85a2..5d4b09feb 100644 --- a/tests/signals/pysignal_test.py +++ b/tests/signals/pysignal_test.py @@ -15,6 +15,22 @@ class Dummy(QObject): def __init__(self, parent=None): QObject.__init__(self, parent) + def callDummy(self): + self.emit(SIGNAL("dummy(PyObject)"), "PyObject") + + +class PyObjectType(unittest.TestCase): + def mySlot(self, arg): + self.assertEqual(arg, "PyObject") + self.called = True + + def testType(self): + self.called = False + o = Dummy() + o.connect(SIGNAL("dummy(PyObject)"), self.mySlot) + o.callDummy() + self.assert_(self.called) + class PythonSigSlot(unittest.TestCase): def setUp(self): self.called = False |