From 28000755c2913851a3c7c339a8eabe6ece450c30 Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Tue, 31 Aug 2010 11:35:43 -0300 Subject: Created unittest to bug #324. Reviewer: Luciano Wolf Hugo Parente Lima --- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_324.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/QtGui/bug_324.py (limited to 'tests') 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() -- cgit v1.2.3