コード例 #1
0
ファイル: core.py プロジェクト: RedHatQE/pong
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: parsing.py プロジェクト: RedHatQE/pong
 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
コード例 #4
0
ファイル: core.py プロジェクト: RedHatQE/pong
    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
コード例 #5
0
    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
コード例 #6
0
 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
コード例 #7
0
ファイル: decorators.py プロジェクト: RedHatQE/pong
 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