예제 #1
0
파일: unittest.py 프로젝트: fxia22/ASM_xf
    def run(self, output, seed = None):
        output.start(self.numTests)
        tests = self.tests
        if self.sortTests:
            tests.sort(lambda x,y: cmp(str(x), str(y)))

        log.startKeepingErrors()
        r = None
        if seed is not None:
            import random
            r = random.Random(seed)
            r.shuffle(tests)
            output.writeln('Running tests shuffled with seed %d' % seed)

        for test in tests:
            test.runTests(output)
        
        for name, exc in self.couldNotImport.items():
            output.reportImportError(name, exc)

        output.stop()
예제 #2
0
 def run(self, result):
     try:
         log.startKeepingErrors()
         TestSuite.run(self, result)
     finally:
         self._bail()
예제 #3
0
 def run(self, result):
     try:
         log.startKeepingErrors()
         TestSuite.run(self, result)
     finally:
         self._bail()
예제 #4
0
 def _initLogging(self):
     log.startKeepingErrors()