6 from gi
.repository
import GLib
9 class TestThread(unittest
.TestCase
):
11 self
.main
= GLib
.MainLoop()
13 def from_thread_cb(self
, test
, enum
):
14 assert test
== self
.obj
16 assert type(enum
) != int
19 self
.obj
= testhelper
.get_test_thread()
20 self
.obj
.connect('from-thread', self
.from_thread_cb
)
21 self
.obj
.emit('emit-signal')
23 def test_extension_module(self
):
24 GLib
.idle_add(self
.idle_cb
)
25 GLib
.timeout_add(50, self
.timeout_cb
)