3 from __future__
import absolute_import
7 from gi
.repository
import GObject
11 GUnknown
= GObject
.type_from_name("TestUnknown")
12 Unknown
= GUnknown
.pytype
15 class MyUnknown(Unknown
, testhelper
.Interface
):
16 some_property
= GObject
.Property(type=str)
19 Unknown
.__init
__(self
)
22 def do_iface_method(self
):
24 Unknown
.do_iface_method(self
)
27 GObject
.type_register(MyUnknown
)
30 class MyObject(GObject
.GObject
, testhelper
.Interface
):
31 some_property
= GObject
.Property(type=str)
34 GObject
.GObject
.__init
__(self
)
37 def do_iface_method(self
):
41 GObject
.type_register(MyObject
)
44 class TestIfaceImpl(unittest
.TestCase
):
46 def test_reimplement_interface(self
):
49 self
.assertEqual(m
.called
, True)
51 def test_implement_interface(self
):
54 self
.assertEqual(m
.called
, True)