Closed
Description
While packaging pandas 0.17 for Nix, I noticed this test to fail. I've tested with both Python 2.7 and 3.4.
test_invalid_index_types (pandas.tseries.tests.test_frequencies.TestFrequencyInference) ... ERROR
======================================================================
ERROR: test_invalid_index_types (pandas.tseries.tests.test_frequencies.TestFrequencyInference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/tests/test_frequencies.py", line 565, in test_invalid_index_types
self.assertRaises(ValueError, lambda : frequencies.infer_freq(i))
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/util/testing.py", line 1879, in assertRaises
_callable(*args, **kwargs)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/tests/test_frequencies.py", line 565, in <lambda>
self.assertRaises(ValueError, lambda : frequencies.infer_freq(i))
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/frequencies.py", line 855, in infer_freq
index = pd.DatetimeIndex(index)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/util/decorators.py", line 89, in wrapper
return func(*args, **kwargs)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/index.py", line 315, in __new__
subarr = tools.to_datetime(data, box=False)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/util/decorators.py", line 89, in wrapper
return func(*args, **kwargs)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/tools.py", line 276, in to_datetime
unit=unit, infer_datetime_format=infer_datetime_format)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/tools.py", line 395, in _to_datetime
return _convert_listlike(arg, box, format)
File "/tmp/nix-build-python2.7-pandas-0.17.0.drv-0/pandas-0.17.0/pandas/tseries/tools.py", line 372, in _convert_listlike
require_iso8601=require_iso8601)
File "pandas/tslib.pyx", line 1828, in pandas.tslib.array_to_datetime (pandas/tslib.c:36848)
cpdef array_to_datetime(ndarray[object] values, errors='raise',
File "pandas/tslib.pyx", line 2017, in pandas.tslib.array_to_datetime (pandas/tslib.c:36443)
raise
File "pandas/tslib.pyx", line 2011, in pandas.tslib.array_to_datetime (pandas/tslib.c:36333)
oresult[i] = parse_datetime_string(val, dayfirst=dayfirst,
File "pandas/tslib.pyx", line 1602, in pandas.tslib.parse_datetime_string (pandas/tslib.c:29166)
dt = parse_date(date_string, default=_DEFAULT_DATETIME,
File "/nix/store/cc5vqjhmxwnm5f0jwixyi0g643y3iv4f-python2.7-dateutil-2.2/lib/python2.7/site-packages/dateutil/parser.py", line 748, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/nix/store/cc5vqjhmxwnm5f0jwixyi0g643y3iv4f-python2.7-dateutil-2.2/lib/python2.7/site-packages/dateutil/parser.py", line 310, in parse
res, skipped_tokens = self._parse(timestr, **kwargs)
TypeError: 'NoneType' object is not iterable
Since Travis does not seem to be failing I could imagine this is a Nix issue. If so, do you have any suggestion regarding dependencies of software this specific piece of code that is tested needs?