Exemple #1
0
    def test_object_none_inout(self):
        object_ = GIMarshallingTests.Object(int=42)
        new_object = GIMarshallingTests.object_none_inout(object_)

        self.assertTrue(isinstance(new_object, GIMarshallingTests.Object))

        self.assertFalse(object_ is new_object)

        self.assertEquals(object_.__grefcount__, 1)
        self.assertEquals(new_object.__grefcount__, 2)

        new_new_object = GIMarshallingTests.object_none_inout(object_)
        self.assertTrue(new_new_object is new_object)

        GIMarshallingTests.object_none_inout(GIMarshallingTests.SubObject(int=42))