Пример #1
0
 def getSummary(self):
     '''
     Gets a summary of test results.
     '''
     runTime = self._counters[_STOP_STAMP] - self._counters[_START_STAMP]
     summary = {
         COUNTER_RUN_TIME: utils.runTimeToString(runTime),
         COUNTER_N_TESTS: self._counters[COUNTER_N_TESTS],
         COUNTER_TESTS_RUN: self._counters[COUNTER_TESTS_RUN],
         COUNTER_CORE_DUMPS: self._counters[COUNTER_CORE_DUMPS]
     }
     # Copy all status counters except STATUS_NO_RUN
     for status in STATUS_COUNTERS[1:]:
         summary[status] = self._counters[status]
     return summary
Пример #2
0
 def getSummary(self):
     '''
     Gets a summary of test results.
     '''
     runTime = self._counters[_STOP_STAMP] - self._counters[_START_STAMP]
     summary = {
         COUNTER_RUN_TIME: utils.runTimeToString(runTime),
         COUNTER_N_TESTS: self._counters[COUNTER_N_TESTS],
         COUNTER_TESTS_RUN: self._counters[COUNTER_TESTS_RUN],
         COUNTER_CORE_DUMPS: self._counters[COUNTER_CORE_DUMPS]
     }
     # Copy all status counters except STATUS_NO_RUN
     for status in STATUS_COUNTERS[1:]:
         summary[status] = self._counters[status]
     return summary
Пример #3
0
 def testRunTimeToStringMoreThan24h(self):
     seconds = 398770.412366
     self.assertEqual("110h 46m 10.41s", runTimeToString(seconds))
Пример #4
0
 def testRunTimeToStringSecondsOnly(self):
     seconds = 46.99982
     self.assertEqual("47.00s", runTimeToString(seconds))
Пример #5
0
 def testRunTimeToStringNoHours(self):
     seconds = 1444.37982
     self.assertEqual("24m 4.38s", runTimeToString(seconds))
Пример #6
0
 def testRunTimeToString(self):
     seconds = 8642.10982
     self.assertEqual("2h 24m 2.11s", runTimeToString(seconds))
Пример #7
0
 def testRunTimeToStringMoreThan24h(self):
     seconds = 398770.412366
     self.assertEqual("110h 46m 10.41s", runTimeToString(seconds))
Пример #8
0
 def testRunTimeToStringSecondsOnly(self):
     seconds = 46.99982
     self.assertEqual("47.00s", runTimeToString(seconds))
Пример #9
0
 def testRunTimeToStringNoHours(self):
     seconds = 1444.37982
     self.assertEqual("24m 4.38s", runTimeToString(seconds))
Пример #10
0
 def testRunTimeToString(self):
     seconds = 8642.10982
     self.assertEqual("2h 24m 2.11s", runTimeToString(seconds))