1 # -*- Mode: Python; py-indent-offset: 4 -*-
2 # vim: tabstop=4 shiftwidth=4 expandtab
4 # Copyright (C) 2010 Simon van der Linden <svdlinden@src.gnome.org>
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
21 from ..overrides import override
22 from ..module import get_introspection_module
24 GIMarshallingTests = get_introspection_module('GIMarshallingTests')
28 OVERRIDES_CONSTANT = 7
29 __all__.append('OVERRIDES_CONSTANT')
32 class OverridesStruct(GIMarshallingTests.OverridesStruct):
34 def __new__(cls, long_):
35 return GIMarshallingTests.OverridesStruct.__new__(cls)
37 def __init__(self, long_):
38 GIMarshallingTests.OverridesStruct.__init__(self)
42 return GIMarshallingTests.OverridesStruct.method(self) / 7
44 OverridesStruct = override(OverridesStruct)
45 __all__.append('OverridesStruct')
48 class OverridesObject(GIMarshallingTests.OverridesObject):
50 def __new__(cls, long_):
51 return GIMarshallingTests.OverridesObject.__new__(cls)
53 def __init__(self, long_):
54 GIMarshallingTests.OverridesObject.__init__(self)
55 # FIXME: doesn't work yet
60 self = GIMarshallingTests.OverridesObject.new()
61 # FIXME: doesn't work yet
66 """Overridden doc string."""
67 return GIMarshallingTests.OverridesObject.method(self) / 7
69 OverridesObject = override(OverridesObject)
70 __all__.append('OverridesObject')