]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport:
authorAnthony Baxter <anthonybaxter@gmail.com>
Sun, 30 Nov 2003 01:45:20 +0000 (01:45 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Sun, 30 Nov 2003 01:45:20 +0000 (01:45 +0000)
Fix a bug discovered by Kalle Svensson: comparing sys.maxint to
2**32-1 makes no sense.  Use 2**31-1 instead.

Lib/test/test_format.py

index f7918747d007e9572e30fc838d524eb0b19a2e0f..b280ffb1ef4e790360d3285c357ef846819b83e7 100644 (file)
@@ -230,7 +230,7 @@ test_exc(u'no format', '1', TypeError,
 test_exc(u'no format', u'1', TypeError,
          "not all arguments converted during string formatting")
 
-if sys.maxint == 2**32-1:
+if sys.maxint == 2**31-1:
     # crashes 2.2.1 and earlier:
     try:
         "%*d"%(sys.maxint, -127)