From: Guido van Rossum Date: Mon, 10 Feb 2003 20:48:19 +0000 (+0000) Subject: Backport 1.16: Fix printing plural (s or ""). X-Git-Tag: v2.2.3c1~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b94120c053df5a42b841d68aa87ad0681848f27e;p=thirdparty%2FPython%2Fcpython.git Backport 1.16: Fix printing plural (s or ""). --- diff --git a/Lib/unittest.py b/Lib/unittest.py index a97a962f7003..2523f431c40e 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -616,7 +616,7 @@ class TextTestRunner: self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % - (run, run == 1 and "" or "s", timeTaken)) + (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): self.stream.write("FAILED (")