Created unit test for QKeySequence.operator[].
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
f94046f4a2
commit
94571574b4
2 changed files with 21 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ PYSIDE_TEST(qpixmap_test.py)
|
||||||
PYSIDE_TEST(qpixmap_constructor.py)
|
PYSIDE_TEST(qpixmap_constructor.py)
|
||||||
PYSIDE_TEST(qpolygonf_test.py)
|
PYSIDE_TEST(qpolygonf_test.py)
|
||||||
PYSIDE_TEST(qpushbutton_test.py)
|
PYSIDE_TEST(qpushbutton_test.py)
|
||||||
|
PYSIDE_TEST(qkeysequence_test.py)
|
||||||
PYSIDE_TEST(qradialgradient_test.py)
|
PYSIDE_TEST(qradialgradient_test.py)
|
||||||
PYSIDE_TEST(qregion_test.py)
|
PYSIDE_TEST(qregion_test.py)
|
||||||
PYSIDE_TEST(qshortcut_test.py)
|
PYSIDE_TEST(qshortcut_test.py)
|
||||||
|
|
|
||||||
20
tests/QtGui/qkeysequence_test.py
Normal file
20
tests/QtGui/qkeysequence_test.py
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from PySide.QtCore import Qt
|
||||||
|
from PySide.QtGui import QKeySequence
|
||||||
|
|
||||||
|
from helper import UsesQApplication
|
||||||
|
|
||||||
|
class QKeySequenceTest(UsesQApplication):
|
||||||
|
|
||||||
|
def testGetItemOperator(self):
|
||||||
|
# bug #774
|
||||||
|
ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
|
||||||
|
self.assertEqual(ks[0], Qt.SHIFT)
|
||||||
|
self.assertEqual(ks[1], Qt.CTRL)
|
||||||
|
self.assertEqual(ks[2], Qt.Key_P)
|
||||||
|
self.assertEqual(ks[3], Qt.Key_R)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue