summaryrefslogtreecommitdiffstats
path: root/tests/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/enum.py')
-rw-r--r--tests/enum.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/enum.py b/tests/enum.py
index b27f09b..5c75736 100644
--- a/tests/enum.py
+++ b/tests/enum.py
@@ -142,6 +142,36 @@ class FlagsTest(unittest.TestCase):
assert hasattr(klass, '__flags_values__')
assert isinstance(klass.__flags_values__, dict)
assert len(klass.__flags_values__) >= 3
+
+ def testComparision(self):
+ e = gtk.TREE_VIEW_DROP_BEFORE
+ assert e == 0
+ assert not e == 10
+ assert not e != 0
+ assert e != 10
+ assert not e < 0
+ assert e < 10
+ assert not e > 0
+ assert not e > 10
+ assert e >= 0
+ assert not e >= 10
+ assert e <= 0
+ assert e <= 10
+ def testComparision(self):
+ flag = gdk.EXPOSURE_MASK
+ assert flag == 2
+ assert not flag == 10
+ assert not flag != 2
+ assert flag != 10
+ assert not flag < 2
+ assert flag < 10
+ assert not flag > 2
+ assert not flag > 10
+ assert flag >= 2
+ assert not flag >= 10
+ assert flag <= 2
+ assert flag <= 10
+
if __name__ == '__main__':
unittest.main()