def _create_queue_elem_for_test_name(self, test_name): """ Create the appropriate queue_elem to run the given test_name. :param test_name: Name of test to be queued. :return: queue_elem representing the test_name to be run. """ test_case = testcases.make_test_case(self._suite.test_kind, self.test_queue_logger, test_name, **self.test_config) return queue_elem_factory(test_case, self.test_config, self._suite.options)
def _requeue_test(self, queue, queue_elem, interrupt_flag): """Requeue a test if it needs to be repeated.""" if not queue_elem.should_requeue(): return queue_elem.testcase = testcases.make_test_case( queue_elem.testcase.REGISTERED_NAME, queue_elem.testcase.logger, queue_elem.testcase.test_name, **queue_elem.test_config) if not interrupt_flag.is_set(): self._log_requeue_test(queue_elem) queue.put(queue_elem)