aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-05-07 15:56:56 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-05-07 15:56:56 -0300
commitf34be7e312e71430580e7168c9b52d33126b71e8 (patch)
treeeda58bd39e191404cd35d90352826a6603bfbd73 /tests
parentf17539378b995711c011b74070509566f30c7e9a (diff)
New test case to cover QMenu.addAction() problem. Bug #167.
Diffstat (limited to 'tests')
-rw-r--r--tests/qtgui/qmenuadd_test.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/qtgui/qmenuadd_test.py b/tests/qtgui/qmenuadd_test.py
new file mode 100644
index 00000000..47b112bf
--- /dev/null
+++ b/tests/qtgui/qmenuadd_test.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+
+''' Test the QMenu.addAction() method'''
+
+import unittest
+import sys
+
+from PySide import QtGui
+
+from helper import UsesQApplication
+
+class QMenuAddAction(UsesQApplication):
+
+ def openFile(self, *args):
+ self.arg = args
+
+ def testQMenuAddAction(self):
+ fileMenu = QtGui.QMenu("&File")
+
+ addNewAction = fileMenu.addAction("&Open...", self.openFile)
+ addNewAction.trigger()
+ self.assertEquals(self.arg, ())
+
+if __name__ == '__main__':
+ unittest.main()