Skip to content

pandas.tests.test_graphics.TestDataFramePlots test_unsorted_index failure #2854

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
lodagro opened this issue Feb 12, 2013 · 6 comments
Closed
Labels
Testing pandas testing functions or related to the test suite Visualization plotting

Comments

@lodagro
Copy link
Contributor

lodagro commented Feb 12, 2013

======================================================================
FAIL: test_unsorted_index (pandas.tests.test_graphics.TestDataFramePlots)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<...>/pandas/tests/test_graphics.py", line 312, in test_unsorted_index
    tm.assert_series_equal(rs, df.y)
  File "<...>/pandas/util/testing.py", line 166, in assert_series_equal
    assert(left.dtype == right.dtype)
AssertionError

...

(Pdb) p left.dtype
dtype('int32')
(Pdb) p right.dtype
dtype('int64')
(Pdb) p pd.__version__
'0.11.0.dev-dad367e'
@jreback
Copy link
Contributor

jreback commented Feb 12, 2013

yeh...the comparison series is built with dtype=int, which is platform dependent; and the rhs side defaults (as it wasn't specified to int64), so either need to change to np.int64 in Series construction or set check_dtypes=False in the assert

(prior to 0.11, the Series would always upcast, now that dtypes is supported #2708, can get test failures like this)

@jreback
Copy link
Contributor

jreback commented Feb 12, 2013

this doesn't fail on 64-bit and isn't tested on travis (as it requires matplotlib I guess...and don't build with that), should we?

@ghost
Copy link

ghost commented Feb 12, 2013

mpl is available in the FULL_DEPS build. Check the bottom of the log for installed versions:
https://travis-ci.org/pydata/pandas/jobs/4745031

are you sure the tests are not run?

@jreback
Copy link
Contributor

jreback commented Feb 12, 2013

oh...didn't think they were running because this test has not failed on travis....and given what other tests I had to change on 32-bit I think this WOULD fail....odd

@jreback
Copy link
Contributor

jreback commented Feb 12, 2013

@lodagro which arch is this failing on?

@lodagro
Copy link
Contributor Author

lodagro commented Feb 12, 2013

Linux ubuntu 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:57 UTC 2013 i686 i686 i386 GNU/Linux

Test is ok, if i set dtype to np.int64 iso int.

jreback added a commit that referenced this issue Feb 12, 2013
TST: avoid platform dependency, close #2854
thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Visualization plotting
Projects
None yet
Development

No branches or pull requests

2 participants