Ejemplo n.º 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, [])
Ejemplo n.º 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)
Ejemplo n.º 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, [])
Ejemplo n.º 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)