aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-25 17:45:02 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-25 17:45:02 -0300
commit2593f9fccc71a200c5a802b2e05717910885e864 (patch)
tree6206d602de230b6c0c710d2655a189dfddcb901e /tests
parent4e6d901bf8dd8e709fd00506679e7dad67c33ded (diff)
Created unittest to bug 307.
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_307.py27
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 077dd1a9f..5bccc20c8 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -2,6 +2,7 @@
PYSIDE_TEST(api2_test.py)
PYSIDE_TEST(bug_243.py)
+PYSIDE_TEST(bug_307.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_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()