From: Guido van Rossum Date: Wed, 14 May 1997 21:37:23 +0000 (+0000) Subject: Fix hex tests for 64-bit machines. X-Git-Tag: v1.5a2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1c96d1b5c5b94edc84c057278a29f4aa7a32453;p=python Fix hex tests for 64-bit machines. --- diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py index 3262bad188..8d8a7250bc 100644 --- a/Lib/test/test_b1.py +++ b/Lib/test/test_b1.py @@ -208,7 +208,9 @@ def f(): pass print 'hex' if hex(16) != '0x10': raise TestFailed, 'hex(16)' if hex(16L) != '0x10L': raise TestFailed, 'hex(16L)' -if hex(-16) != '0xfffffff0': raise TestFailed, 'hex(-16)' +if len(hex(-1)) != len(hex(sys.maxint)): raise TestFailed, 'len(hex(-1))' +if hex(-16) not in ('0xfffffff0', '0xfffffffffffffff0'): + raise TestFailed, 'hex(-16)' if hex(-16L) != '-0x10L': raise TestFailed, 'hex(-16L)' print 'id'