Permalink
Browse files

Print how many tests met and failed their time targets, and list whic…

…h ones didn't meet their time.
  • Loading branch information...
1 parent 1c3e39c commit d78cefeddff94ef1616668d9cab28f738fa085d9 @adamfast committed Jun 28, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 slowpoke/runner.py
View
7 slowpoke/runner.py
@@ -68,5 +68,12 @@ def run_tests(self, test_labels, extra_tests=None, **kwargs):
for tr in settings.CURRENT_SLOWPOKE_TEST_RUNS:
tr.suite_run = self._the_run
tr.save(using='slowpokelogs')
+
+ print('%d tests met their performance standard.' % self._the_run.testrun_set.filter(meets_standard=True).count())
+ print('%d tests did not meet their performance standard.' % self._the_run.testrun_set.filter(meets_standard=False).count())
+
+ for the_test in self._the_run.testrun_set.filter(meets_standard=False):
+ print('%s took %sms, %sms allowed.' % (the_test.function_name, the_test.runtime_ms, TIME_STANDARDS.get(the_test.test_standard)))
+
settings.DATABASES['slowpokelogs']['NAME'] = 'test_slowpokelogs'
return result

0 comments on commit d78cefe

Please sign in to comment.