Skip to content

Formatting unit tests failure on windows + 2.6 (Trac #975) #1573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thouis opened this issue Oct 19, 2012 · 3 comments
Closed

Formatting unit tests failure on windows + 2.6 (Trac #975) #1573

thouis opened this issue Oct 19, 2012 · 3 comments

Comments

@thouis
Copy link
Contributor

thouis commented Oct 19, 2012

Original ticket http://projects.scipy.org/numpy/ticket/975 on 2008-12-23 by @cournape, assigned to unknown.

Harmless, but still annoying:

======================================================================
FAIL: Check formatting.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\numpy\core\tests\test_print.py", line 28, in test_complex_types
    assert_equal(str(t(x)), str(complex(x)))
  File "C:\Python26\Lib\site-packages\numpy\testing\utils.py", line 183, in assert_equal
    raise AssertionError(msg)
AssertionError:
Items are not equal:
 ACTUAL: '(1e+020+0j)'
 DESIRED: '(1e+20+0j)'

======================================================================
FAIL: Check formatting.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\numpy\core\tests\test_print.py", line 16, in test_float_types
    assert_equal(str(t(x)), str(float(x)))
  File "C:\Python26\Lib\site-packages\numpy\testing\utils.py", line 183, in assert_equal
    raise AssertionError(msg)
AssertionError:
Items are not equal:
 ACTUAL: '1e+020'
 DESIRED: '1e+20'
@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@cournape wrote on 2008-12-27

Should be fixed in r6210: I copied the float formating implementation from python code, so that we are more compatible with it. It fixes all issues on 2.6, as well as some issues on 2.5 (and I guess on 2.4, although I have not tested it).

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@cournape wrote on 2008-12-28

The issue is more complex than first expected. We use PyOS_sprintf for our formatting needs, but the function is not consistent across platforms (the problem is being fixed in python: http://mail.python.org/pipermail/python-bugs-list/2007-December/043559.html).

Maybe the solution is to have our own formatting functions, which does not sound like fun...

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@cournape wrote on 2009-03-09

Fixed in the float formatting branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant