From 2593f9fccc71a200c5a802b2e05717910885e864 Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Wed, 25 Aug 2010 17:45:02 -0300 Subject: Created unittest to bug 307. --- tests/QtGui/bug_307.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/QtGui/bug_307.py (limited to 'tests/QtGui/bug_307.py') diff --git a/tests/QtGui/bug_307.py b/tests/QtGui/bug_307.py new file mode 100644 index 000000000..1a4446b83 --- /dev/null +++ b/tests/QtGui/bug_307.py @@ -0,0 +1,27 @@ + +import unittest +import colorsys + +from PySide.QtCore import SIGNAL +from PySide.QtGui import QPushButton, QApplication + + +class Test (QApplication) : + def __init__(self, argv) : + super(Test, self).__init__(argv) + self._called = False + + def called(self): + self._called = True + + +class QApplicationSignalsTest(unittest.TestCase): + def testQuit(self): + app = Test([]) + button = QPushButton("BUTTON") + app.connect(button, SIGNAL("clicked()"), app.called) + button.click() + self.assert_(app._called) + +if __name__ == '__main__': + unittest.main() -- cgit v1.2.3