def test_TwoIterations(self): """Test reaping adopted children""" pids = [6, 5] def _wait(): return pids.pop(0), None self.wait = _wait reaperlib.reap(self.reactor, 5) self.assertEquals(pids, [])
def test_simple(self): """Test reaping our child""" waitCount = [0] def _wait(): waitCount[0] += 1 return 5, None self.wait = _wait reaperlib.reap(self.reactor, 5) self.assertEquals(waitCount[0], 1)