Example #1
0
 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, [])
Example #2
0
 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)
Example #3
0
    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, [])
Example #4
0
    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)