def should_remove_task(self, task, params, file_patterns): # pushlog_id == -1 - this is the case when run from a cron.yml job if params.get('pushlog_id') == -1: return False changed = files_changed.check(params, file_patterns) if not changed: logger.debug('no files found matching a pattern in `skip-unless-changed` for ' + task.label) return True return False
def test_check_match(self): self.assertTrue(files_changed.check(PARAMS, ["devtools/**"]))
def test_check_no_match(self): self.assertFalse(files_changed.check(PARAMS, ["nosuch/**"]))
def test_check_no_params(self): self.assertTrue(files_changed.check({}, ["ignored"]))