示例#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)
示例#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)
示例#3
0
 def test_reap_no_job(self):
     """Test base case for reap
     """
     self.assertEqual(controller.reap_all_jobs(), 0)
示例#4
0
 def test_reap_no_job(self):
     """Test base case for reap
     """
     self.assertEqual(controller.reap_all_jobs(), 0)