Пример #1
0
    def test_object_none_in(self):
        object_ = GIMarshallingTests.Object(int=42)
        GIMarshallingTests.object_none_in(object_)
        self.assertEquals(object_.__grefcount__, 1)

        object_ = GIMarshallingTests.SubObject(int=42)
        GIMarshallingTests.object_none_in(object_)

        object_ = gobject.GObject()
        self.assertRaises(TypeError, GIMarshallingTests.object_none_in, object_)

        self.assertRaises(TypeError, GIMarshallingTests.object_none_in, None)