Skip to content

Commit

Permalink
fixups from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Apr 15, 2017
1 parent d4bdb0a commit 72ffe97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pandas/plotting/_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from pandas.formats.printing import pprint_thing
import pandas.compat as compat

from pandas.tseries.converter import (TimeSeries_DateLocator,
TimeSeries_DateFormatter,
TimeSeries_TimedeltaFormatter)
from pandas.plotting._converter import (TimeSeries_DateLocator,
TimeSeries_DateFormatter,
TimeSeries_TimedeltaFormatter)

# ---------------------------------------------------------------------
# Plotting functions and monkey patches
Expand Down
13 changes: 7 additions & 6 deletions pandas/tests/plotting/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime, date

import numpy as np
import matplotlib.dates as dates
from pandas import Timestamp, Period, Index
from pandas.compat import u
import pandas.util.testing as tm
Expand Down Expand Up @@ -83,7 +84,7 @@ def test_conversion_float(self):

rs = self.dtc.convert(
Timestamp('2012-1-1 01:02:03', tz='UTC'), None, None)
xp = converter.dates.date2num(Timestamp('2012-1-1 01:02:03', tz='UTC'))
xp = dates.date2num(Timestamp('2012-1-1 01:02:03', tz='UTC'))
tm.assert_almost_equal(rs, xp, decimals)

rs = self.dtc.convert(
Expand All @@ -97,18 +98,18 @@ def test_conversion_outofbounds_datetime(self):
# 2579
values = [date(1677, 1, 1), date(1677, 1, 2)]
rs = self.dtc.convert(values, None, None)
xp = converter.dates.date2num(values)
xp = dates.date2num(values)
tm.assert_numpy_array_equal(rs, xp)
rs = self.dtc.convert(values[0], None, None)
xp = converter.dates.date2num(values[0])
xp = dates.date2num(values[0])
self.assertEqual(rs, xp)

values = [datetime(1677, 1, 1, 12), datetime(1677, 1, 2, 12)]
rs = self.dtc.convert(values, None, None)
xp = converter.dates.date2num(values)
xp = dates.date2num(values)
tm.assert_numpy_array_equal(rs, xp)
rs = self.dtc.convert(values[0], None, None)
xp = converter.dates.date2num(values[0])
xp = dates.date2num(values[0])
self.assertEqual(rs, xp)

def test_time_formatter(self):
Expand All @@ -120,7 +121,7 @@ def test_dateindex_conversion(self):
for freq in ('B', 'L', 'S'):
dateindex = tm.makeDateIndex(k=10, freq=freq)
rs = self.dtc.convert(dateindex, None, None)
xp = converter.dates.date2num(dateindex._mpl_repr())
xp = dates.date2num(dateindex._mpl_repr())
tm.assert_almost_equal(rs, xp, decimals)

def test_resolution(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def pxd(name):
'pandas.io.msgpack',
'pandas._libs',
'pandas.formats',
'pandas.plotting'
'pandas.plotting',
'pandas.sparse',
'pandas.stats',
'pandas.util',
Expand Down

0 comments on commit 72ffe97

Please sign in to comment.