Example #1
0
    def test_start_reap_job(self, *args):
        """Start a no-op job and reap it
           Using len() as a sample function
           Actually, forking in unit tests is a no-no, hence the mock fork - see
           http://www.reddit.com/r/Python/comments/19704u/how_would_you_unit_test_code_that_calls_osfork/
        """
        self.assertTrue(controller.start_job('test', len, 'foo'))

        self.assertEqual(controller.reap_all_jobs(), 1)
Example #2
0
    def test_start_reap_job(self, *args):
        """Start a no-op job and reap it
           Using len() as a sample function
           Actually, forking in unit tests is a no-no, hence the mock fork - see
           http://www.reddit.com/r/Python/comments/19704u/how_would_you_unit_test_code_that_calls_osfork/
        """
        self.assertTrue(controller.start_job('test', len, 'foo'))

        self.assertEqual(controller.reap_all_jobs(), 1)
Example #3
0
 def test_reap_no_job(self):
     """Test base case for reap
     """
     self.assertEqual(controller.reap_all_jobs(), 0)
Example #4
0
 def test_reap_no_job(self):
     """Test base case for reap
     """
     self.assertEqual(controller.reap_all_jobs(), 0)