Fix bug#493 - "__eq__ and friends not implemented for QKeyEvent == QKeySequence"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
parent
bc9ddff514
commit
249a87808a
3 changed files with 29 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ PYSIDE_TEST(bug_430.py)
|
|||
PYSIDE_TEST(bug_433.py)
|
||||
PYSIDE_TEST(bug_467.py)
|
||||
PYSIDE_TEST(bug_480.py)
|
||||
PYSIDE_TEST(bug_493.py)
|
||||
PYSIDE_TEST(bug_500.py)
|
||||
PYSIDE_TEST(bug_512.py)
|
||||
PYSIDE_TEST(bug_525.py)
|
||||
|
|
|
|||
21
tests/QtGui/bug_493.py
Normal file
21
tests/QtGui/bug_493.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from PySide.QtCore import *
|
||||
from PySide.QtGui import *
|
||||
import unittest
|
||||
|
||||
|
||||
class TestBug569(unittest.TestCase):
|
||||
|
||||
def testIt(self):
|
||||
# We need a qapp otherwise Qt will crash when trying to detect the
|
||||
# current platform
|
||||
app = QApplication([])
|
||||
ev1 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Delete, Qt.NoModifier)
|
||||
ev2 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Copy, Qt.NoModifier)
|
||||
ks = QKeySequence.Delete
|
||||
self.assertEqual(ev1, ks)
|
||||
self.assertEqual(ks, ev1)
|
||||
self.assertNotEqual(ev2, ks)
|
||||
self.assertNotEqual(ks, ev2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue