Create QAction signal test.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
83cf37f609
commit
cf90354ff9
2 changed files with 25 additions and 0 deletions
22
tests/QtGui/qaction_test.py
Normal file
22
tests/QtGui/qaction_test.py
Normal file
|
|
@ -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()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue