aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-16 17:45:09 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-17 15:35:24 -0300
commitcf90354ff99bc90ecfc6ea57e3cbddcad6bab9a1 (patch)
treeef71ba816c6dd3efae917edc8d9a3c737073477d /tests/QtGui
parent83cf37f609ca3adb343be090054188dc254b9741 (diff)
Create QAction signal test.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt3
-rw-r--r--tests/QtGui/qaction_test.py22
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 5d1cec422..5ff457940 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -1,3 +1,5 @@
+#Keep this in alphabetical sort
+
PYSIDE_TEST(api2_test.py)
PYSIDE_TEST(add_action_test.py)
PYSIDE_TEST(customproxywidget_test.py)
@@ -14,6 +16,7 @@ PYSIDE_TEST(qapplication_singleton_test.py)
PYSIDE_TEST(qapp_test.py)
PYSIDE_TEST(qbrush_test.py)
PYSIDE_TEST(qcolor_test.py)
+PYSIDE_TEST(qaction_test.py)
PYSIDE_TEST(qdatastream_gui_operators_test.py)
PYSIDE_TEST(qfontdialog_test.py)
PYSIDE_TEST(qfontmetrics_test.py)
diff --git a/tests/QtGui/qaction_test.py b/tests/QtGui/qaction_test.py
new file mode 100644
index 000000000..b926ad692
--- /dev/null
+++ b/tests/QtGui/qaction_test.py
@@ -0,0 +1,22 @@
+import unittest
+
+from PySide.QtGui import QAction, QWidget
+from helper import UsesQApplication
+
+class QPainterDrawText(UsesQApplication):
+
+ def _cb(self, checked):
+ self._called = True
+
+ def testSignal(self):
+ o = QWidget()
+ act = QAction(o)
+ self._called = False
+ act.triggered.connect(self._cb)
+ act.trigger()
+ self.assert_(self._called)
+
+
+if __name__ == '__main__':
+ unittest.main()
+