summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/enum.py4
-rw-r--r--tests/gtype.py18
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/enum.py b/tests/enum.py
index 5cc18ac..98dbd89 100644
--- a/tests/enum.py
+++ b/tests/enum.py
@@ -143,7 +143,7 @@ class FlagsTest(unittest.TestCase):
assert isinstance(klass.__flags_values__, dict)
assert len(klass.__flags_values__) >= 3
- def testComparision(self):
+ def testEnumComparision(self):
enum = gtk.TREE_VIEW_DROP_BEFORE
assert enum == 0
assert not enum == 10
@@ -158,7 +158,7 @@ class FlagsTest(unittest.TestCase):
assert enum <= 0
assert enum <= 10
- def testComparision(self):
+ def testFlagComparision(self):
flag = gdk.EXPOSURE_MASK
assert flag == 2
assert not flag == 10
diff --git a/tests/gtype.py b/tests/gtype.py
index a20a2e8..4cf7dd9 100644
--- a/tests/gtype.py
+++ b/tests/gtype.py
@@ -1,19 +1,19 @@
import unittest
-from common import gobject, gtk
+from common import gobject
class GTypeTest(unittest.TestCase):
def checkType(self, expected, *objects):
- # Silly method to check pyg_type_from_object
-
- store = gtk.ListStore(expected)
- val = store.get_column_type(0)
+ # First, double check so we get back what we sent
+ str = gobject.type_name(expected) # pyg_type_from_object
+ val = gobject.type_from_name(str) # pyg_type_wrapper_new
assert val == expected, \
'got %r while %r was expected' % (val, expected)
+ # Then test the objects
for object in objects:
- store = gtk.ListStore(object)
- val = store.get_column_type(0)
+ str = gobject.type_name(expected)
+ val = gobject.type_from_name(str)
assert val == expected, \
'got %r while %r was expected' % (val, expected)
@@ -45,10 +45,10 @@ class GTypeTest(unittest.TestCase):
self.checkType(gobject.TYPE_FLOAT, 'gfloat')
def testPyObject(self):
- self.checkType(gobject.TYPE_PYOBJECT, object)
+ self.checkType(gobject.TYPE_PYOBJECT, 'GObject', object)
def testObject(self):
- self.checkType(gobject.TYPE_OBJECT)
+ self.checkType(gobject.TYPE_OBJECT, 'PyObject')
# XXX: Flags, Enums