def _fill_tests_results(self, testsuite_element):
        """Creates records for all testcases results."""
        if not self.tests_records.results:
            raise NothingToDoException("Nothing to export")

        records = dict(passed=0, skipped=0, failures=0, waiting=0, time=0.0)
        for testcase_result in self.tests_records.results:
            self._gen_testcase(testsuite_element, testcase_result, records)

        tests_num = (
            records["passed"] + records["skipped"] + records["failures"] + records["waiting"]
        )

        if tests_num == 0:
            raise NothingToDoException("Nothing to export")

        testsuite_element.set("errors", str(records["skipped"]))
        testsuite_element.set("failures", str(records["failures"]))
        testsuite_element.set("skipped", str(records["waiting"]))
        testsuite_element.set("time", "{:.4f}".format(records["time"]))
        testsuite_element.set("tests", str(tests_num))
def _fill_tests_results ( self , testsuite_element ) : if not self . tests_records . results : raise NothingToDoException ( "Nothing to export" ) records = dict ( passed = 0 , skipped = 0 , failures = 0 , waiting = 0 , time = 0.0 ) for testcase_result in self . tests_records . results : self . _gen_testcase ( testsuite_element , testcase_result , records ) tests_num = ( records [ "passed" ] + records [ "skipped" ] + records [ "failures" ] + records [ "waiting" ] ) if tests_num == 0 : raise NothingToDoException ( "Nothing to export" ) testsuite_element . set ( "errors" , str ( records [ "skipped" ] ) ) testsuite_element . set ( "failures" , str ( records [ "failures" ] ) ) testsuite_element . set ( "skipped" , str ( records [ "waiting" ] ) ) testsuite_element . set ( "time" , "{:.4f}" . format ( records [ "time" ] ) ) testsuite_element . set ( "tests" , str ( tests_num ) )
Creates records for all testcases results.