سؤال

Pandas is not working properly on my system, and I am trying to fix it. Below is the output I got running nosetests pandas (all output available here); do you have any suggestion on how to fix this?

======================================================================
FAIL: test_fred_parts (pandas.io.tests.test_data.TestFred)
---------------------------------------------------------------------- 
Traceback (most recent call last):
  File "/Users/Alberto/anaconda/lib/python2.7/site-packages/pandas/util/testing.py", line 1135, in wrapper
    return t(*args, **kwargs)
  File "/Users/Alberto/anaconda/lib/python2.7/site-packages/pandas/io/tests/test_data.py", line 424, in test_fred_parts
    self.assertEqual(df.ix['2010-05-01'][0], 217.23) 
AssertionError: 217.29900000000001 != 217.23

----------------------------------------------------------------------
Ran 4836 tests in 377.165s

FAILED (SKIP=88, failures=2)
هل كانت مفيدة؟

المحلول

This particular test is an "allowable failure" in the pandas network tests (it's decorated as network and I think may have even had to change recently in master to make it less sensitive). Data is grabbed from FRED and parsed and tested against what pandas has queried previously...

Sometimes network tests fails intermittently, it may be that the API has changed, the connection is down, or the numbers have been changed slightly (which from the assertion message looks to be the case here).

This is nothing to worry about, as you can see the other 4836 pass! :)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top