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
|
|
@ -1,3 +1,5 @@
|
||||||
|
#Keep this in alphabetical sort
|
||||||
|
|
||||||
PYSIDE_TEST(api2_test.py)
|
PYSIDE_TEST(api2_test.py)
|
||||||
PYSIDE_TEST(add_action_test.py)
|
PYSIDE_TEST(add_action_test.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
|
|
@ -14,6 +16,7 @@ PYSIDE_TEST(qapplication_singleton_test.py)
|
||||||
PYSIDE_TEST(qapp_test.py)
|
PYSIDE_TEST(qapp_test.py)
|
||||||
PYSIDE_TEST(qbrush_test.py)
|
PYSIDE_TEST(qbrush_test.py)
|
||||||
PYSIDE_TEST(qcolor_test.py)
|
PYSIDE_TEST(qcolor_test.py)
|
||||||
|
PYSIDE_TEST(qaction_test.py)
|
||||||
PYSIDE_TEST(qdatastream_gui_operators_test.py)
|
PYSIDE_TEST(qdatastream_gui_operators_test.py)
|
||||||
PYSIDE_TEST(qfontdialog_test.py)
|
PYSIDE_TEST(qfontdialog_test.py)
|
||||||
PYSIDE_TEST(qfontmetrics_test.py)
|
PYSIDE_TEST(qfontmetrics_test.py)
|
||||||
|
|
|
||||||
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