From 1ea50f3d403ce364106b24d6462cffb07b9fc339 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 Aug 2013 14:16:35 +0530 Subject: [PATCH] ... --- src/calibre/db/tests/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/db/tests/main.py b/src/calibre/db/tests/main.py index 200c9b357b..83b8dd7d8f 100644 --- a/src/calibre/db/tests/main.py +++ b/src/calibre/db/tests/main.py @@ -55,7 +55,8 @@ class TestResult(unittest.TextTestResult): if self.wasSuccessful(): tests = sorted(self.times, key=self.times.get, reverse=True) slowest = ['%s [%g s]' % (t.id(), self.times[t]) for t in tests[:3]] - self.stream.writeln('\nSlowest tests: %s' % ' '.join(slowest)) + if len(slowest) > 1: + self.stream.writeln('\nSlowest tests: %s' % ' '.join(slowest)) def find_tests(): return unittest.defaultTestLoader.discover(os.path.dirname(os.path.abspath(__file__)), pattern='*.py')