Skip to content

testArrayNumpyLabelled fails on Python 2.7.10 #10837

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
cel4 opened this issue Aug 17, 2015 · 5 comments · Fixed by #10853
Closed

testArrayNumpyLabelled fails on Python 2.7.10 #10837

cel4 opened this issue Aug 17, 2015 · 5 comments · Fixed by #10853
Labels
IO JSON read_json, to_json, json_normalize Testing pandas testing functions or related to the test suite
Milestone

Comments

@cel4
Copy link
Contributor

cel4 commented Aug 17, 2015

FAIL: testArrayNumpyLabelled (pandas.io.tests.test_json.test_ujson.NumpyJSONTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ch/repo/pandas/.tox/py27/lib/python2.7/site-packages/pandas/io/tests/test_json/test_ujson.py", line 1141, in testArrayNumpyLabelled
    self.assertTrue((expectedvals == output[0]).all())
AssertionError: False is not true
-------------------- >> begin captured stdout << ---------------------
[[42 31]
 [24 99]
 [ 2 78]]
[[31 42]
 [99 24]
 [78  2]]

--------------------- >> end captured stdout << ----------------------

Order of dict elements seems to be non-deterministic for python2.7 versions as well.

@jreback
Copy link
Contributor

jreback commented Aug 17, 2015

well this doesn't fail on travis AFAICT, nor have I ever actually seen this fail. So not sure how to repro.

@kawochen
Copy link
Contributor

Do you have a 32-bit build? This test does seem to depend on a few things, including architecture and the PYTHONHASHSEED environment variable.

@cel4
Copy link
Contributor Author

cel4 commented Aug 18, 2015

@kawochen, No, I am running a 64bit interpreter. Yes, the failure is highly hardware/interpreter/seed dependent. But that is the point of this bug report.

@cel4 cel4 changed the title testArrayNumpyLabelled fails on Python 2.7.10 testArrayNumpyLabelled fails on Python 2.7.10 Aug 18, 2015
@jreback
Copy link
Contributor

jreback commented Aug 18, 2015

@cel4 can you give the specific system this fails on. Yes its is somewhat non-deterministic, though in py2 the ordering is deterministic. Kind of a silly test actually (but IIRC came from another package :). Why don't you do a pull-request to sort them first.

@jreback jreback added Testing pandas testing functions or related to the test suite IO JSON read_json, to_json, json_normalize labels Aug 18, 2015
@cel4
Copy link
Contributor Author

cel4 commented Aug 18, 2015

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: de_DE.UTF-8
LANG: de_DE.UTF-8

pandas: 0.16.2+340.ge4368de.dirty
nose: 1.3.7
Cython: 0.23
numpy: 1.9.2
scipy: None
statsmodels: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.4.2
pytz: 2015.4
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: 1.8.6
xlrd: 0.9.4
xlwt: None
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.4.0
html5lib: 0.999999
httplib2: 0.9.1
apiclient: 1.2
sqlalchemy: 1.0.8
pymysql: None
psycopg2: None

If the test fails or passes depends on the python hashseed.

e.g. PYTHONHASHSEED='1145934480' deterministically fails that test, PYTHONHASHSEED='2585294338' deterministically passes the test here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO JSON read_json, to_json, json_normalize Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants