示例#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))