Esempio n. 1
0
 def reportError(self, test, err):
     name, classname = self.getTestNames(test)
     self.xml.write('   <testcase name="%s" classname="%s">\n' % (name, classname))
     self.xml.write('      <failure message=" "/>\n')
     self.xml.write('   </testcase>\n')
     sys.stderr.write("%s %s.%s\n" % (failStr('[   FAILED ]'), classname, name))
     self.testFailed += 1
Esempio n. 2
0
 def closeXmlReport(self):
      self.xml.write('</testsuite>\n')
      self.xml.close()
      print >> sys.stderr, greenLowStr("[==========]") + " run %d tests\n" % self.numberTests
      if (self.testFailed):
          print >> sys.stderr, failStr("[  FAILED  ]") + " %d tests\n" % self.testFailed
      else:
          print >> sys.stderr, greenLowStr("[  PASSED  ]") + " %d tests\n" % (self.numberTests - self.testFailed)
 def reportError(self, test, err):
     name, classname = self.getTestNames(test)
     self.xml.write('   <testcase name="%s" classname="%s">\n' %
                    (name, classname))
     self.xml.write('      <failure message=" "/>\n')
     self.xml.write('   </testcase>\n')
     sys.stderr.write("%s %s.%s\n" %
                      (failStr('[   FAILED ]'), classname, name))
     self.testFailed += 1
 def closeXmlReport(self):
     self.xml.write('</testsuite>\n')
     self.xml.close()
     print >> sys.stderr, greenLowStr(
         "[==========]") + " run %d tests\n" % self.numberTests
     if (self.testFailed):
         print >> sys.stderr, failStr(
             "[  FAILED  ]") + " %d tests\n" % self.testFailed
     else:
         print >> sys.stderr, greenLowStr(
             "[  PASSED  ]") + " %d tests\n" % (self.numberTests -
                                                self.testFailed)