summaryrefslogtreecommitdiffstats
path: root/tests/test_gi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r--tests/test_gi.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py
index e8654b6..2d9c002 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1422,6 +1422,25 @@ class TestGObject(unittest.TestCase):
# self.assertEquals(object_.__grefcount__, 1)
+class TestPythonGObject(unittest.TestCase):
+
+ class Object(TestGI.Object):
+ __gtype_name__ = "Object"
+
+ def method(self):
+ # Don't call super, which asserts that self.int == 42.
+ pass
+
+ def test_object(self):
+ self.assertTrue(issubclass(self.Object, TestGI.Object))
+
+ object_ = self.Object(int = 42)
+ self.assertTrue(isinstance(object_, self.Object))
+
+ def test_object_method(self):
+ self.Object(int = 0).method()
+
+
class TestMultiOutputArgs(unittest.TestCase):
def test_int_out_out(self):