9 class TestProcess(unittest.TestCase):
11 def _child_watch_cb(self, pid, condition, data):
15 def testChildWatch(self):
17 self.loop = glib.MainLoop()
18 argv = [sys.executable, '-c', 'import sys']
19 pid, stdin, stdout, stderr = glib.spawn_async(
20 argv, flags=glib.SPAWN_DO_NOT_REAP_CHILD)
22 glib.child_watch_add(pid, self._child_watch_cb, 12345)
24 self.assertEqual(self.data, 12345)