Loop through all completed tests and print their output.
519422
private function printOutput(): void
    {
        foreach ($this->db->query('SELECT id, file_name FROM tests WHERE completed = 1')->fetchAll() as $test) {
            $this->printer->printFeedback($this->pending[$test['file_name']]);
            $this->db->prepare('DELETE FROM tests WHERE id = :id')->execute([
                'id' => $test['id'],
            ]);
        }
    }
434233
def output_tap(self):
        """"""
        tracker = Tracker(streaming=True, stream=sys.stdout)
        for group in self.config.analysis_groups:
            n_providers = len(group.providers)
            n_checkers = len(group.checkers)
            if not group.providers and group.checkers:
                test_suite = group.name
                description_lambda = lambda r: r.checker.name
            elif not group.checkers:
                logger.warning(
                    'Invalid analysis group (no checkers), skipping')
                continue
            elif n_providers > n_checkers:
                test_suite = group.checkers[0].name
                description_lambda = lambda r: r.provider.name
            else:
                test_suite = group.providers[0].name
                description_lambda = lambda r: r.checker.name

            for result in group.results:
                description = description_lambda(result)
                if result.code == ResultCode.PASSED:
                    tracker.add_ok(test_suite, description)
                elif result.code == ResultCode.IGNORED:
                    tracker.add_ok(
                        test_suite, description + ' (ALLOWED FAILURE)')
                elif result.code == ResultCode.NOT_IMPLEMENTED:
                    tracker.add_not_ok(
                        test_suite, description, 'TODO implement the test')
                elif result.code == ResultCode.FAILED:
                    tracker.add_not_ok(
                        test_suite, description,
                        diagnostics='  ---\n  message: %s\n  hint: %s\n  ...' % (
                            '\n  message: '.join(result.messages.split('\n')),
                            result.checker.hint))
856336
def run_simulation(self):
        """"""
        print('Starting simulations...')
        for i in range(self.num_trials):
            print('---Trial {}---'.format(i))
            self.run_trial(i)
        print('Simulation completed.')
502628
private void printResultInfo(Status resultStatus, PrintWriter reportWriter) {
    switch (resultStatus) {
      case FAIL_TO_FIND_CLASS:
        reportWriter.println(FAIL_TO_FIND_CLASS_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      case FAIL_TO_FIND_FS:
        reportWriter.println(FAIL_TO_FIND_FS_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      case FAIL_TO_SUPPORT_HA:
        reportWriter.println(FAIL_TO_SUPPORT_HA_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      default:
        reportWriter.println(TEST_PASSED_MESSAGE);
        break;
    }
  }
393347
def display_all(self):
        
        print( ("total elapse %0.6f seconds, last elapse %0.6f seconds, "
                "took %s times measurement") % (
                    self.total_elapse, self.elapse, len(self.records)))
1294761
def _print_results(results, stat=False, verbose=False):
    
    results.generate_pretty_output(stat=stat,
                                   verbose=verbose,
                                   output_function=click.secho)
96363
def run_all
      results = runner.run([options[:spec_dir]])

      self.last_failed_paths = results.keys
      self.last_run_failed   = !results.empty?

      throw :task_has_failed if last_run_failed
    end
767550
function printResults()
    {
        $results = $this->resultList();
        foreach ( $results as $result )
        {
            $this->display( $result );
        }
    }
1369386
def report(self, stream):
        """"""
        if not self.enabled:
            return

        # if multiprocessing plugin enabled - get items from results queue
        if self.multiprocessing_enabled:
            for i in range(_results_queue.qsize()):
                try:
                    k, v, s = _results_queue.get(False)
                    self._timed_tests[k] = {
                        'time': v,
                        'status': s,
                    }
                except Queue.Empty:
                    pass

        d = sorted(self._timed_tests.items(), key=lambda item: item[1]['time'], reverse=True)

        if self.json_file:
            dict_type = OrderedDict if self.timer_top_n else dict
            with open(self.json_file, 'w') as f:
                json.dump({'tests': dict_type((k, v) for k, v in d)}, f)

        total_time = sum([vv['time'] for kk, vv in d])

        for i, (test, time_and_status) in enumerate(d):
            time_taken = time_and_status['time']
            status = time_and_status['status']
            if i < self.timer_top_n or self.timer_top_n == -1:
                color = self._get_result_color(time_taken)
                percent = 0 if total_time == 0 else time_taken / total_time * 100
                line = self._format_report_line(
                    test=test,
                    time_taken=time_taken,
                    color=color,
                    status=status,
                    percent=percent,
                )
                _filter = self._COLOR_TO_FILTER.get(color)
                if self.timer_filter is None or _filter is None or _filter in self.timer_filter:
                    stream.writeln(line)
941495
def finalize(self):
        
        #Determine the percentage success on the unit tests. Also see the total time for all
        #the unit tests.
        stotal = 0
        ttotal = 0
        for test in self.repo.testing.tests:
            stotal += (1 if test["success"]==True else 0)
            ttotal += (test["end"] - test["start"]).seconds

        self.percent = stotal/float(len(self.repo.testing.tests))
        self.message = "Results: {0:.2%} in {1:d}s.".format(self.percent, ttotal)
        if not self.testmode:
            if percent < 1:
                self.commit.create_status("failure", self.url, self.message)
            elif any([test["code"] == 1 for test in self.repo.testing.tests]):
                self.commit.create_status("pending", self.url, self.message + " Slowdown reported.")
            else:
                self.commit.create_status("success", self.url, self.message)
        self.server.wiki.update(self)
1176214
def Print(self):
        """"""
        for val, prob in sorted(self.d.iteritems()):
            print(val, prob)
806287
def loop(self):
        """"""
        while True:
            sleep(1)
            new_file_list = self.walk(self.file_path, {})
            if new_file_list != self.file_list:
                if self.debug:
                    self.diff_list(new_file_list, self.file_list)
                self.run_tests()
                self.file_list = new_file_list
927501
def run():
    

    print('Python ' + sys.version.replace('\n', ''))

    try:
        oscrypto_tests_module_info = imp.find_module('tests', [os.path.join(build_root, 'oscrypto')])
        oscrypto_tests = imp.load_module('oscrypto.tests', *oscrypto_tests_module_info)
        oscrypto = oscrypto_tests.local_oscrypto()
        print('\noscrypto backend: %s' % oscrypto.backend())
    except (ImportError):
        pass

    if run_lint:
        print('')
        lint_result = run_lint()
    else:
        lint_result = True

    if run_coverage:
        print('\nRunning tests (via coverage.py)')
        sys.stdout.flush()
        tests_result = run_coverage(ci=True)
    else:
        print('\nRunning tests')
        sys.stdout.flush()
        tests_result = run_tests()
    sys.stdout.flush()

    return lint_result and tests_result
141619
def dump_junit(self):
        """"""
        testsuites = ElementTree.Element('testsuites', name='therapist', time=str(round(self.execution_time, 2)),
                                         tests=str(self.count()), failures=str(self.count(status=Result.FAILURE)),
                                         errors=str(self.count(status=Result.ERROR)))

        for result in self.objects:
            failures = '1' if result.is_failure else '0'
            errors = '1' if result.is_error else '0'

            testsuite = ElementTree.SubElement(testsuites, 'testsuite', id=result.process.name,
                                               name=str(result.process), time=str(round(result.execution_time, 2)),
                                               tests='1', failures=failures, errors=errors)

            testcase = ElementTree.SubElement(testsuite, 'testcase', time=str(round(result.execution_time, 2)))
            testcase.attrib['name'] = result.process.name

            if result.is_failure or result.is_error:
                if result.is_failure:
                    element = ElementTree.SubElement(testcase, 'failure', type='failure')
                else:
                    element = ElementTree.SubElement(testcase, 'error', type='error')

                if result.error:
                    element.text = result.error
                else:
                    element.text = result.output if result.output else ''

        xmlstr = ElementTree.tostring(testsuites, encoding='utf-8').decode('utf-8')
        return '<?xml version="1.0" encoding="UTF-8"?>\n{}'.format(xmlstr)
960740
def run(self):
        """"""
        if self.auto_clear:
            os.system('cls' if os.name == 'nt' else 'auto_clear')
        else:
            print
        print 'Running unit tests...'
        if self.auto_clear:
            print
        subprocess.call('nosetests', cwd=self.directory)
329113
private function run() {
		$issues = [];
		$totalFiles = 0;
		$totalLines = 0;
		$filePath = $this->scanner->getCurrentFilePath();
		if (!$this->options->getOption('t') || in_array('syntax', $this->options->getOption('t'), true)) {
			$checkSyntax = true;
			$versionGood = $this->tests->getPHPVersion();
			if (!$versionGood) {
				$this->reporter->add("ERROR!  Syntax checking was selected and a PHP binary lower than 7.0.0-dev was specified.", 0, 1);
			}
		} else {
			$checkSyntax = false;
		}

		while (($lines = $this->scanner->scanNextFile()) !== false) {
			$totalFiles++;

			//Check syntax and assign a line to grab if needed.
			$grabLineNumber = null;
			$grabLine = null;
			if ($checkSyntax) {
				$syntax = $this->tests->checkSyntax($filePath);
				if (!isset($syntax['is_valid'])) {
					$grabLineNumber = $syntax['line'];
				}
			}

			foreach ($lines as $index => $line) {
				$lineNumber = $index + 1;
				$line = trim($line, "\r\n");

				if ($lineNumber == $grabLineNumber) {
					$grabLine = $line;
				}

				$totalLines++;
				$issues = $this->tests->testLine($line);
				foreach ($issues as $section => $tests) {
					foreach ($tests as $test => $true) {
						$this->reporter->addToSection($section, $test, $filePath, $lineNumber, $line);
					}
				}
			}

			if ($checkSyntax && $grabLine !== null) {
				$this->reporter->addToSection('syntax', 'syntax', $filePath, $grabLineNumber, $grabLine.' //'.$syntax['error']);
			}
			$filePath = $this->scanner->getCurrentFilePath();
		}
		$this->reporter->add("Processed {$totalLines} lines contained in {$totalFiles} files.", 0, 1);
	}
696243
@SuppressWarnings("unused")
    public void printAll()
    {
        project.getLogger().lifecycle("Full contents of dependency configurations:");
        project.getLogger().lifecycle("-------------------------------------------");
        for (final Map.Entry<String, DependencyConfig> entry : depConfigs.entrySet()) {
            project.getLogger().lifecycle("- " + entry.getKey() + ":\t" + entry.getValue());
        }
    }