]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.16: Fix printing plural (s or "").
authorGuido van Rossum <guido@python.org>
Mon, 10 Feb 2003 20:48:19 +0000 (20:48 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Feb 2003 20:48:19 +0000 (20:48 +0000)
Lib/unittest.py

index a97a962f70030fc1111548ab1c1610598643ee78..2523f431c40edd795711b1651f240dab25fbd8de 100644 (file)
@@ -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 (")