Repository: pandas-dev/pandas

Issue:
Multiple test errors related to time/date/timezones
# 
## ERROR: test moving from daylight savings to standard time

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3898, in test_fallback_plural
    expected_utc_offset=hrs_post
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3845, in _test_all_offsets
    self._test_offset(offset_name=name, offset_n=n, **kwds)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3851, in _test_offset
    self.assertTrue(get_utc_offset_hours(t) == expected_utc_offset)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3809, in get_utc_offset_hours
    return (o.days \* 24 \* 3600 + o.seconds) / 3600.0
AttributeError: 'NoneType' object has no attribute 'days'
# 
## ERROR: test moving from standard to daylight savings

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3909, in test_springforward_plural
    expected_utc_offset=hrs_post
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3845, in _test_all_offsets
    self._test_offset(offset_name=name, offset_n=n, **kwds)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3851, in _test_offset
    self.assertTrue(get_utc_offset_hours(t) == expected_utc_offset)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_offsets.py", line 3809, in get_utc_offset_hours
    return (o.days \* 24 \* 3600 + o.seconds) / 3600.0
AttributeError: 'NoneType' object has no attribute 'days'
# 
## ERROR: test_timestamp_tz_convert (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 341, in test_timestamp_tz_convert
    conv = idx[0].tz_convert(self.tzstr('US/Pacific'))
  File "pandas/tslib.pyx", line 502, in pandas.tslib.Timestamp.tz_convert (pandas/tslib.c:10823)
TypeError: Cannot convert tz-naive Timestamp, use tz_localize to localize
# 
## ERROR: test_utc_with_system_utc (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 848, in test_utc_with_system_utc
    self.assertEqual(ts, ts.tz_convert(dateutil.tz.tzutc()))
  File "pandas/tslib.pyx", line 502, in pandas.tslib.Timestamp.tz_convert (pandas/tslib.c:10823)
TypeError: Cannot convert tz-naive Timestamp, use tz_localize to localize
# 
## ERROR: test_with_tz (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 382, in test_with_tz
    central = dr.tz_convert(tz)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/index.py", line 1599, in tz_convert
    raise TypeError('Cannot convert tz-naive timestamps, use '
TypeError: Cannot convert tz-naive timestamps, use tz_localize to localize
# 
## ERROR: test_tz_convert_roundtrip (pandas.tseries.tests.test_timezones.TestTimeZones)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 1034, in test_tz_convert_roundtrip
    reset = converted.tz_convert(None)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/index.py", line 1599, in tz_convert
    raise TypeError('Cannot convert tz-naive timestamps, use '
TypeError: Cannot convert tz-naive timestamps, use tz_localize to localize
# 
## ERROR: test_tz_convert_roundtrip (pandas.tseries.tests.test_tslib.TestTimestamp)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_tslib.py", line 312, in test_tz_convert_roundtrip
    reset = converted.tz_convert(None)
  File "pandas/tslib.pyx", line 502, in pandas.tslib.Timestamp.tz_convert (pandas/tslib.c:10823)
TypeError: Cannot convert tz-naive Timestamp, use tz_localize to localize
# 
## FAIL: test_append_with_timezones_dateutil (pandas.io.tests.test_pytables.TestHDFStore)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/tests/test_pytables.py", line 2037, in test_append_with_timezones_dateutil
    self.assertRaises(TypeError, store.append, 'df_tz', df)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1576, in assertRaises
    _callable(_args, *_kwargs)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: TypeError not raised.
# 
## FAIL: test_period_resample_with_local_timezone_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timeseries.py", line 2049, in test_period_resample_with_local_timezone_dateutil
    assert_series_equal(result, expected)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 686, in assert_series_equal
    assert_index_equal(left.index, right.index, check_names=check_names)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 543, in assert_index_equal
    right.dtype))
AssertionError: [index] left [int64 PeriodIndex(['2013-11-01', '2013-11-02'], dtype='int64', freq='D')], right [PeriodIndex(['2013-10-31', '2013-11-01'], dtype='int64', freq='D') int64]
# 
## FAIL: test_ambiguous_flags (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 471, in test_ambiguous_flags
    self.assert_numpy_array_equal(dr, localized)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 644, in assert_numpy_array_equal
    '{0} is not equal to {1}.'.format(np_array, assert_equal))
AssertionError: DatetimeIndex(['2011-11-06 00:00:00', '2011-11-06 01:00:00',
               '2011-11-06 02:00:00', '2011-11-06 03:00:00',
               '2011-11-06 04:00:00'],
              dtype='datetime64[ns]', freq='H', tz=None) is not equal to DatetimeIndex(['2011-11-06 00:00:00', '2011-11-06 01:00:00',
               '2011-11-06 01:00:00', '2011-11-06 02:00:00',
               '2011-11-06 03:00:00'],
              dtype='datetime64[ns]', freq=None, tz=None).
# 
## FAIL: test_ambiguous_infer (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 432, in test_ambiguous_infer
    self.assertRaises(pytz.AmbiguousTimeError, dr.tz_localize, tz)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1576, in assertRaises
    _callable(_args, *_kwargs)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: AmbiguousTimeError not raised.
# 
## FAIL: test_ambiguous_nat (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 517, in test_ambiguous_nat
    self.assert_numpy_array_equal(di_test, localized)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 644, in assert_numpy_array_equal
    '{0} is not equal to {1}.'.format(np_array, assert_equal))
AssertionError: DatetimeIndex(['2011-11-06 00:00:00-04:00',                       'NaT',
                                     'NaT', '2011-11-06 02:00:00-05:00',
               '2011-11-06 03:00:00-05:00'],
              dtype='datetime64[ns]', freq=None, tz='US/Eastern') is not equal to DatetimeIndex(['2011-11-06 00:00:00', '2011-11-06 01:00:00',
               '2011-11-06 01:00:00', '2011-11-06 02:00:00',
               '2011-11-06 03:00:00'],
              dtype='datetime64[ns]', freq=None, tz=None).
# 
## FAIL: test_datetimeindex_tz_nat (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 811, in test_datetimeindex_tz_nat
    self.assertTrue(idx[0].tzinfo is not None)
AssertionError: False is not true
# 
## FAIL: test_frame_no_datetime64_dtype (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 672, in test_frame_no_datetime64_dtype
    self.assertEqual(e['B'].dtype, 'O')
AssertionError: dtype('<M8[ns]') != 'O'
# 
## FAIL: test_index_with_timezone_repr (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 562, in test_index_with_timezone_repr
    self.assertIn('2010-04-13 00:00:00', rng_repr)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 577, in assertIn
    assert a in b, "%s: %r is not in %r" % (msg.format(a, b), a, b)
AssertionError: : '2010-04-13 00:00:00' is not in "DatetimeIndex(['2010-04-13', '2010-04-14', '2010-04-15', '2010-04-16',\n               '2010-04-17', '2010-04-18', '2010-04-19', '2010-04-20',\n               '2010-04-21', '2010-04-22', '2010-04-23', '2010-04-24',\n               '2010-04-25', '2010-04-26', '2010-04-27', '2010-04-28',\n               '2010-04-29', '2010-04-30', '2010-05-01', '2010-05-02',\n               '2010-05-03', '2010-05-04', '2010-05-05', '2010-05-06'],\n              dtype='datetime64[ns]', freq='D', tz=None)"
# 
## FAIL: test_infer_tz (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 538, in test_infer_tz
    self.assertRaises(Exception, tools._infer_tzinfo, start, end)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1576, in assertRaises
    _callable(_args, *_kwargs)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: Exception not raised.
# 
## FAIL: test_localize_utc_conversion (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 107, in test_localize_utc_conversion
    self.assert_numpy_array_equal(converted.asi8, expected_naive.asi8)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 644, in assert_numpy_array_equal
    '{0} is not equal to {1}.'.format(np_array, assert_equal))
AssertionError: [1331337600000000000 1331339400000000000 1331341200000000000
 1331343000000000000 1331344800000000000 1331346600000000000
 1331348400000000000 1331350200000000000 1331352000000000000
 1331353800000000000 1331355600000000000 1331357400000000000
 1331359200000000000 1331361000000000000 1331362800000000000
 1331364600000000000 1331366400000000000 1331368200000000000
 1331370000000000000 1331371800000000000 1331373600000000000
 1331375400000000000 1331377200000000000 1331379000000000000
 1331380800000000000 1331382600000000000 1331384400000000000
 1331386200000000000 1331388000000000000 1331389800000000000
 1331391600000000000 1331393400000000000 1331395200000000000
 1331397000000000000 1331398800000000000 1331400600000000000
 1331402400000000000 1331404200000000000 1331406000000000000
 1331407800000000000 1331409600000000000 1331411400000000000
 1331413200000000000 1331415000000000000 1331416800000000000
 1331418600000000000 1331420400000000000 1331422200000000000
 1331424000000000000] is not equal to [1331355600000000000 1331357400000000000 1331359200000000000
 1331361000000000000 1331362800000000000 1331364600000000000
 1331366400000000000 1331368200000000000 1331370000000000000
 1331371800000000000 1331373600000000000 1331375400000000000
 1331377200000000000 1331379000000000000 1331380800000000000
 1331382600000000000 1331384400000000000 1331386200000000000
 1331388000000000000 1331389800000000000 1331391600000000000
 1331393400000000000 1331395200000000000 1331397000000000000
 1331398800000000000 1331400600000000000 1331402400000000000
 1331404200000000000 1331406000000000000 1331407800000000000
 1331409600000000000 1331411400000000000 1331413200000000000
 1331415000000000000 1331416800000000000 1331418600000000000
 1331420400000000000 1331422200000000000 1331424000000000000
 1331425800000000000 1331427600000000000 1331429400000000000
 1331431200000000000 1331433000000000000 1331434800000000000
 1331436600000000000 1331438400000000000 1331440200000000000
 1331442000000000000].
# 
## FAIL: test_localize_utc_conversion_explicit (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 122, in test_localize_utc_conversion_explicit
    self.assertTrue(np.array_equal(converted.asi8, expected_naive.asi8))
AssertionError: False is not true
# 
## FAIL: test_timedelta_push_over_dst_boundary (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 184, in test_timedelta_push_over_dst_boundary
    self.assertEqual(result, expected)
AssertionError: Timestamp('2012-03-11 04:00:00') != Timestamp('2012-03-11 05:00:00')
# 
## FAIL: test_timedelta_push_over_dst_boundary_explicit (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 197, in test_timedelta_push_over_dst_boundary_explicit
    self.assertEqual(result, expected)
AssertionError: Timestamp('2012-03-11 04:00:00') != Timestamp('2012-03-11 05:00:00')
# 
## FAIL: test_tz_localize_dti (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 210, in test_tz_localize_dti
    self.assert_numpy_array_equal(dti2.values, dti_utc.values)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 644, in assert_numpy_array_equal
    '{0} is not equal to {1}.'.format(np_array, assert_equal))
AssertionError: ['2005-01-01T01:00:00.000000000+0100' '2005-01-01T01:00:00.001000000+0100'
 '2005-01-01T01:00:00.002000000+0100' ...,
 '2005-01-01T01:00:30.254000000+0100' '2005-01-01T01:00:30.255000000+0100'
 '2005-01-01T01:00:30.256000000+0100'] is not equal to ['2005-01-01T06:00:00.000000000+0100' '2005-01-01T06:00:00.001000000+0100'
 '2005-01-01T06:00:00.002000000+0100' ...,
 '2005-01-01T06:00:30.254000000+0100' '2005-01-01T06:00:30.255000000+0100'
 '2005-01-01T06:00:30.256000000+0100'].
# 
## FAIL: test_utc_box_timestamp_and_localize (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 335, in test_utc_box_timestamp_and_localize
    self.assertTrue('EDT' in repr(rng_eastern[0].tzinfo) or 'tzfile' in repr(rng_eastern[0].tzinfo))
AssertionError: False is not true
# 
## FAIL: test_with_tz_ambiguous_times (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 411, in test_with_tz_ambiguous_times
    self.assertRaises(pytz.NonExistentTimeError, dr.tz_localize, tz)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1576, in assertRaises
    _callable(_args, *_kwargs)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: NonExistentTimeError not raised.
# 
## FAIL: test_tz_localize_roundtrip (pandas.tseries.tests.test_timezones.TestTimeZones)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_timezones.py", line 963, in test_tz_localize_roundtrip
    localized.tz_localize(tz)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in **exit**
    raise AssertionError("{0} not raised.".format(name))
AssertionError: TypeError not raised.
# 
## FAIL: test_constructor (pandas.tseries.tests.test_tslib.TestTimestamp)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_tslib.py", line 60, in test_constructor
    self.assertEqual(result.value, expected_tz)
AssertionError: 1404205200000000000 != 1404230400000000000
# 
## FAIL: test_repr (pandas.tseries.tests.test_tslib.TestTimestamp)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_tslib.py", line 196, in test_repr
    self.assertIn(tz_repr, repr(date_tz))
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 577, in assertIn
    assert a in b, "%s: %r is not in %r" % (msg.format(a, b), a, b)
AssertionError: : '/America/Los_Angeles' is not in "Timestamp('2014-03-07 00:00:00')"
# 
## FAIL: test_tz_localize_roundtrip (pandas.tseries.tests.test_tslib.TestTimestamp)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tseries/tests/test_tslib.py", line 299, in test_tz_localize_roundtrip
    localized.tz_localize(tz)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 1640, in **exit**
    raise AssertionError("{0} not raised.".format(name))
AssertionError: TypeError not raised.
# 
## FAIL: test_getitem_setitem_datetime_tz_dateutil (pandas.tests.test_series.TestSeries)

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/tests/test_series.py", line 5431, in test_getitem_setitem_datetime_tz_dateutil
    assert_series_equal(result, ts)
  File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/util/testing.py", line 681, in assert_series_equal
    assert_almost_equal(left.values, right.values, check_less_precise)
  File "das/src/testing.pyx", line 58, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2758)
  File "das/src/testing.pyx", line 93, in pandas._testing.assert_almost_equal (pandas/src/testing.c:1843)
  File "das/src/testing.pyx", line 140, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2590)
AssertionError: expected -0.71627 but got -0.58678, with decimal 5

---



Discussion:

Resolving patch:
diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py
--- a/pandas/compat/__init__.py
+++ b/pandas/compat/__init__.py
@@ -26,6 +26,7 @@
 
 Other items:
 * OrderedDefaultDict
+* platform checker
 """
 # pylint disable=W0611
 import functools
@@ -754,3 +755,16 @@ def __missing__(self, key):
     def __reduce__(self):  # optional, for pickle support
         args = self.default_factory if self.default_factory else tuple()
         return type(self), args, None, None, list(self.items())
+
+
+# https://github.com/pydata/pandas/pull/9123
+def is_platform_windows():
+    return sys.platform == 'win32' or sys.platform == 'cygwin'
+
+
+def is_platform_linux():
+    return sys.platform == 'linux2'
+
+
+def is_platform_mac():
+    return sys.platform == 'darwin'


Test patch:
diff --git a/pandas/tests/test_series.py b/pandas/tests/test_series.py
--- a/pandas/tests/test_series.py
+++ b/pandas/tests/test_series.py
@@ -5398,7 +5398,8 @@ def test_getitem_setitem_datetime_tz_pytz(self):
     def test_getitem_setitem_datetime_tz_dateutil(self):
         tm._skip_if_no_dateutil();
         from dateutil.tz import tzutc
-        from dateutil.zoneinfo import gettz
+        from pandas.tslib import _dateutil_gettz as gettz
+
         tz = lambda x: tzutc() if x == 'UTC' else gettz(x)  # handle special case for utc in dateutil
 
         from pandas import date_range
diff --git a/pandas/tseries/tests/test_daterange.py b/pandas/tseries/tests/test_daterange.py
--- a/pandas/tseries/tests/test_daterange.py
+++ b/pandas/tseries/tests/test_daterange.py
@@ -441,7 +441,7 @@ def test_month_range_union_tz_pytz(self):
     def test_month_range_union_tz_dateutil(self):
         _skip_if_windows_python_3()
         tm._skip_if_no_dateutil()
-        from dateutil.zoneinfo import gettz as timezone
+        from pandas.tslib import _dateutil_gettz as timezone
         tz = timezone('US/Eastern')
 
         early_start = datetime(2011, 1, 1)
diff --git a/pandas/tseries/tests/test_period.py b/pandas/tseries/tests/test_period.py
--- a/pandas/tseries/tests/test_period.py
+++ b/pandas/tseries/tests/test_period.py
@@ -101,15 +101,15 @@ def test_timestamp_tz_arg(self):
                          pytz.timezone('Europe/Brussels').normalize(p).tzinfo)
 
     def test_timestamp_tz_arg_dateutil(self):
-        import dateutil
+        from pandas.tslib import _dateutil_gettz as gettz
         from pandas.tslib import maybe_get_tz
         p = Period('1/1/2005', freq='M').to_timestamp(tz=maybe_get_tz('dateutil/Europe/Brussels'))
-        self.assertEqual(p.tz, dateutil.zoneinfo.gettz('Europe/Brussels'))
+        self.assertEqual(p.tz, gettz('Europe/Brussels'))
 
     def test_timestamp_tz_arg_dateutil_from_string(self):
-        import dateutil
+        from pandas.tslib import _dateutil_gettz as gettz
         p = Period('1/1/2005', freq='M').to_timestamp(tz='dateutil/Europe/Brussels')
-        self.assertEqual(p.tz, dateutil.zoneinfo.gettz('Europe/Brussels'))
+        self.assertEqual(p.tz, gettz('Europe/Brussels'))
 
     def test_timestamp_nat_tz(self):
         t = Period('NaT', freq='M').to_timestamp()
diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py
--- a/pandas/tseries/tests/test_timeseries.py
+++ b/pandas/tseries/tests/test_timeseries.py
@@ -417,9 +417,9 @@ def test_timestamp_to_datetime_explicit_pytz(self):
     def test_timestamp_to_datetime_explicit_dateutil(self):
         _skip_if_windows_python_3()
         tm._skip_if_no_dateutil()
-        import dateutil
+        from pandas.tslib import _dateutil_gettz as gettz
         rng = date_range('20090415', '20090519',
-                         tz=dateutil.zoneinfo.gettz('US/Eastern'))
+                         tz=gettz('US/Eastern'))
 
         stamp = rng[0]
         dtval = stamp.to_pydatetime()
@@ -1807,7 +1807,7 @@ def test_append_concat_tz_explicit_pytz(self):
     def test_append_concat_tz_dateutil(self):
         # GH 2938
         tm._skip_if_no_dateutil()
-        from dateutil.zoneinfo import gettz as timezone
+        from pandas.tslib import _dateutil_gettz as timezone
 
         rng = date_range('5/8/2012 1:45', periods=10, freq='5T',
                          tz='dateutil/US/Eastern')