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>
This commit is contained in:
parent
290d773b32
commit
cf3f6d1cf5
1 changed files with 5 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
from PySide.QtCore import QIODevice, Qt, QFile
|
from PySide.QtCore import QIODevice, Qt, QFile
|
||||||
|
|
||||||
class QFLagTest(unittest.TestCase):
|
class QFlagTest(unittest.TestCase):
|
||||||
'''Test case for usage of flags'''
|
'''Test case for usage of flags'''
|
||||||
|
|
||||||
def testCallFunction(self):
|
def testCallFunction(self):
|
||||||
|
|
@ -40,6 +40,10 @@ class QFlagOperatorTest(unittest.TestCase):
|
||||||
flag |= Qt.WindowMinimizeButtonHint
|
flag |= Qt.WindowMinimizeButtonHint
|
||||||
self.assert_(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):
|
def testEqual(self):
|
||||||
'''QFlags == operator'''
|
'''QFlags == operator'''
|
||||||
flags = Qt.Window
|
flags = Qt.Window
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue