aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-08-09 14:21:22 -0300
committerLauro Neto <lauro.neto@openbossa.org>2010-08-09 14:31:02 -0300
commit5dc1ac791ddc47cf1236f6428331190c5a0f5ab1 (patch)
tree16ae7ce6e1fac873fb08ded8bf6b044cfac04ec1 /tests
parent1b4e1400444de83dfc8027fbf7c6c8f2ce98927b (diff)
Add test for QAction.setShortcut
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/qaction_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/QtGui/qaction_test.py b/tests/QtGui/qaction_test.py
index 0379d20b7..ff7efbe50 100644
--- a/tests/QtGui/qaction_test.py
+++ b/tests/QtGui/qaction_test.py
@@ -24,6 +24,17 @@ class QPainterDrawText(UsesQApplication):
self.assert_(self._called)
+class SetShortcutTest(UsesQApplication):
+
+ def testSetShortcut(self):
+ # Somehow an exception was leaking from the constructor
+ # and appearing in setShortcut.
+ o = QWidget()
+ action = QAction('aaaa', o)
+ shortcut = 'Ctrl+N'
+ action.setShortcut(shortcut)
+ s2 = action.shortcut()
+ self.assertEqual(s2, shortcut)
if __name__ == '__main__':
unittest.main()