[NumPy-Tickets] [NumPy] #1875: hex output format changed in Python3
NumPy Trac
numpy-tickets@scipy....
Tue Jun 21 06:32:27 CDT 2011
#1875: hex output format changed in Python3
---------------------------+------------------------------------------------
Reporter: derek | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 2.0.0
Component: numpy.core | Version: devel
Keywords: Py3k, formats |
---------------------------+------------------------------------------------
test_arrayprint.py fails on python3.x with
{{{
FAIL: Test custom format function for each element in array.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/derek/lib/python3.2/site-
packages/numpy/core/tests/test_arrayprint.py", line 86, in
test_format_function
"[0x0L 0x1L 0x2L]")
File "/Users/derek/lib/python3.2/site-packages/numpy/testing/utils.py",
line 313, in assert_equal
raise AssertionError(msg)
AssertionError:
Items are not equal:
ACTUAL: '[0x0 0x1 0x2]'
DESIRED: '[0x0L 0x1L 0x2L]'
}}}
Apparently the hex() and oct() functions have been decided to print out a
format without the trailing 'L' as of python3 -
[http://mail.python.org/pipermail/python-dev/2006-June/065946.html], so I
suggest to define the expected result depending on the version (see
patch).
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1875>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list