def test_ignored_job_states(self): ignored = [] for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS: ignored.append((start_state, start_state)) ignored.append((end_state, end_state)) for start_state, end_state in ignored: self.assertFalse(states.check_job_transition(start_state, end_state))
def test_ignored_job_states(self): ignored = [] for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS: ignored.append((start_state, start_state)) ignored.append((end_state, end_state)) for start_state, end_state in ignored: self.assertFalse( states.check_job_transition(start_state, end_state))
def state(self): current_state = self._fetch_state() if self._last_state is not None: states.check_job_transition(self._last_state, current_state) self._last_state = current_state return current_state
def state(self): current_state = self._fetch_state() if self._last_state is not None: states.check_job_transition(self._last_state, current_state) self._last_state = current_state return current_state
def test_valid_job_states(self): for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS: self.assertTrue(states.check_job_transition(start_state, end_state))
def test_valid_job_states(self): for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS: self.assertTrue(states.check_job_transition( start_state, end_state))