def validate_test(tc): for key, val in TC_KEYS.items(): tid = tc.work_item_id log.debug("Checking if {} is set for test case {}".format(key, tid)) current = getattr(tc, key) if not current: # set to default setattr(tc, key, val)
def validate_test(tc): for key, val in TC_KEYS.items(): tid = tc.work_item_id log.debug("Checking if {} is set for test case {}".format( key, tid)) current = getattr(tc, key) if not current: # set to default setattr(tc, key, val)
def find_me(self, meth_name, existing_tests=None, multiple=True): log.debug("Querying Polarion for: {}".format(self.query_title)) if existing_tests is None: matches = query_test_case(self.query_title) else: # matches = cached_tc_query(self.name, existing_tests, multiple=multiple) query = self.name + "." + meth_name matches = cached_tc_query(query, existing_tests, multiple=multiple) return matches
def status(self): """ Determines the status from the step_results :return: """ if self._status is None: result = self.attributes["status"] log.debug("Checking step_results of {}: {}".format(self.title, self.step_results)) no_nones = filter(lambda x: x is not None, self.step_results) self.step_results = no_nones if any(filter(lambda ti: ti.status != "PASS" and ti.status != "SKIP", self.step_results)): result = FAIL self._status = result return self._status
def status(self): """ Determines the status from the step_results :return: """ if self._status is None: result = self.attributes["status"] log.debug("Checking step_results of {}: {}".format( self.title, self.step_results)) no_nones = filter(lambda x: x is not None, self.step_results) self.step_results = no_nones if any( filter( lambda ti: ti.status != "PASS" and ti.status != "SKIP", self.step_results)): result = FAIL self._status = result return self._status
def inner(*args, **kwargs): start_time = datetime.datetime.now() result = fn(*args, **kwargs) end_time = datetime.datetime.now() log.debug("\tstart time: {}".format(start_time)) log.debug("\tend time: {}".format(end_time)) log.debug("\ttotal time: {}".format(end_time - start_time)) return result