diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-08-31 11:35:43 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-08-31 11:47:37 -0300 |
commit | 28000755c2913851a3c7c339a8eabe6ece450c30 (patch) | |
tree | b41337725a4a21c50458da68dd227ea4f22a2d60 | |
parent | b9bf521a93785ccd935cc4ce1464cb612c4fdbfe (diff) |
Created unittest to bug #324.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_324.py | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 5bccc20c8..b73e1ce13 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -3,6 +3,7 @@ PYSIDE_TEST(api2_test.py) PYSIDE_TEST(bug_243.py) PYSIDE_TEST(bug_307.py) +PYSIDE_TEST(bug_324.py) PYSIDE_TEST(add_action_test.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(float_to_int_implicit_conversion_test.py) diff --git a/tests/QtGui/bug_324.py b/tests/QtGui/bug_324.py new file mode 100644 index 000000000..9777b73a9 --- /dev/null +++ b/tests/QtGui/bug_324.py @@ -0,0 +1,32 @@ +''' Test bug 324: http://bugs.openbossa.org/show_bug.cgi?id=324''' + +import unittest +import sys +import signal +from PySide.QtCore import * +from PySide.QtGui import * + +class QBug( QObject ): + def __init__(self, parent = None): + QObject.__init__(self, parent) + + def check(self): + self.done.emit("abc") + + done = Signal(str) + +class Bug324(unittest.TestCase): + + def on_done(self, val): + self.value = val + + def testBug(self): + app = QApplication([]) + bug = QBug() + self.value = '' + bug.done.connect(self.on_done) + bug.check() + self.assertEqual(self.value, 'abc') + +if __name__ == '__main__': + unittest.main() |