diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-23 10:46:51 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-23 11:01:27 -0300 |
commit | cf3f6d1cf5e4628e735ce6d164d74861e550071e (patch) | |
tree | 873267c4e74c862dfa61114e02cc31f21cccf2ca /tests/qtcore | |
parent | 290d773b323e8a0c7e9178b4c7997dcb2db5ba97 (diff) |
Adds a new flag test.
The test does an invert operation on the result of an or operation
over two enum values.
Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org>
Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
Diffstat (limited to 'tests/qtcore')
-rw-r--r-- | tests/qtcore/qflags_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/qtcore/qflags_test.py b/tests/qtcore/qflags_test.py index 3eb767217..1346c11ef 100644 --- a/tests/qtcore/qflags_test.py +++ b/tests/qtcore/qflags_test.py @@ -4,7 +4,7 @@ import unittest from PySide.QtCore import QIODevice, Qt, QFile -class QFLagTest(unittest.TestCase): +class QFlagTest(unittest.TestCase): '''Test case for usage of flags''' def testCallFunction(self): @@ -40,6 +40,10 @@ class QFlagOperatorTest(unittest.TestCase): flag |= Qt.WindowMinimizeButtonHint self.assert_(flag & Qt.WindowMinimizeButtonHint) + def testInvertOr(self): + '''QFlags ~ (invert) operator over the result of an | (or) operator''' + self.assert_(isinstance(~(Qt.ItemIsSelectable | Qt.ItemIsEditable), Qt.ItemFlags)) + def testEqual(self): '''QFlags == operator''' flags = Qt.Window |