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()
def run(self, result): try: log.startKeepingErrors() TestSuite.run(self, result) finally: self._bail()
def _initLogging(self): log.startKeepingErrors()