[pypy-svn] r60067 - in pypy/trunk/pypy: objspace/std/test rlib rlib/test
fijal at codespeak.net
fijal at codespeak.net
Sat Nov 22 14:57:21 CET 2008
Author: fijal
Date: Sat Nov 22 14:57:20 2008
New Revision: 60067
Modified:
pypy/trunk/pypy/objspace/std/test/test_longobject.py
pypy/trunk/pypy/rlib/rbigint.py
pypy/trunk/pypy/rlib/test/test_rbigint.py
Log:
format of hex(long) has changed in 2.5, adapt
Modified: pypy/trunk/pypy/objspace/std/test/test_longobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/test/test_longobject.py (original)
+++ pypy/trunk/pypy/objspace/std/test/test_longobject.py Sat Nov 22 14:57:20 2008
@@ -147,7 +147,7 @@
def test_format(self):
assert repr(12345678901234567890) == '12345678901234567890L'
assert str(12345678901234567890) == '12345678901234567890'
- assert hex(0x1234567890ABCDEFL) == '0x1234567890ABCDEFL'
+ assert hex(0x1234567890ABCDEFL) == '0x1234567890abcdefL'
assert oct(01234567012345670L) == '01234567012345670L'
def test_bits(self):
Modified: pypy/trunk/pypy/rlib/rbigint.py
==============================================================================
--- pypy/trunk/pypy/rlib/rbigint.py (original)
+++ pypy/trunk/pypy/rlib/rbigint.py Sat Nov 22 14:57:20 2008
@@ -1336,7 +1336,7 @@
BASE8 = '01234567'
BASE10 = '0123456789'
-BASE16 = '0123456789ABCDEF'
+BASE16 = '0123456789abcdef'
def _format(a, digits, prefix='', suffix=''):
"""
Modified: pypy/trunk/pypy/rlib/test/test_rbigint.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rbigint.py (original)
+++ pypy/trunk/pypy/rlib/test/test_rbigint.py Sat Nov 22 14:57:20 2008
@@ -308,7 +308,7 @@
x = rbigint.fromlong(-18471379832321)
assert x.str() == '-18471379832321'
assert x.repr() == '-18471379832321L'
- assert x.hex() == '-0x10CCB4088E01L'
+ assert x.hex() == '-0x10ccb4088e01L'
assert x.oct() == '-0414626402107001L'
assert x.format('.!') == (
'-!....!!..!!..!.!!.!......!...!...!!!........!')
More information about the Pypy-commit
mailing list