diff options
author | Johan Dahlin <johan@src.gnome.org> | 2005-07-05 20:38:56 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2005-07-05 20:38:56 +0000 |
commit | 8914f109dc0515d8927c76b29ec5b46317965b68 (patch) | |
tree | 682f2eb1919ba86d87a98d14a22616e201a12552 /tests/test_unknown.py | |
parent | 4dd8caf2aae815a22e07f035839bf43739d03feb (diff) | |
download | pygobject-8914f109dc0515d8927c76b29ec5b46317965b68.tar.gz pygobject-8914f109dc0515d8927c76b29ec5b46317965b68.tar.xz pygobject-8914f109dc0515d8927c76b29ec5b46317965b68.zip |
Add GType.is_a and deprecate gobject.type_* Update tests and make
* gobject/gobjectmodule.c: (pyg_type_name), (pyg_type_from_name),
(pyg_type_parent), (pyg_type_is_a), (pyg_type_children),
(pyg_type_interfaces), (get_type_name_for_class), (initgobject):
* gobject/pygtype.c: (_wrap_g_type_is_a), (pyg_type_wrapper_init):
* tests/test_enum.py:
* tests/test_gtype.py:
* tests/test_unknown.py:
Add GType.is_a and deprecate gobject.type_*
Update tests
and make GType.is_a/gobject.type_is_a return a bool instead of int
Diffstat (limited to 'tests/test_unknown.py')
-rw-r--r-- | tests/test_unknown.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_unknown.py b/tests/test_unknown.py index 841a0fb..49e8c40 100644 --- a/tests/test_unknown.py +++ b/tests/test_unknown.py @@ -1,14 +1,15 @@ import unittest +from gobject import GType, new from common import gobject, testhelper -TestInterface = gobject.type_from_name('TestInterface') +TestInterface = GType.from_name('TestInterface') class TestUnknown(unittest.TestCase): def testFoo(self): obj = testhelper.get_unknown() - TestUnknownGType = gobject.type_from_name('TestUnknown') - TestUnknown = gobject.new(TestUnknownGType).__class__ + TestUnknownGType = GType.from_name('TestUnknown') + TestUnknown = new(TestUnknownGType).__class__ assert isinstance(obj, testhelper.Interface) assert isinstance(obj, TestUnknown) |