Skip to content

Commit

Permalink
Adjusts tdi test draw calls to try to fix CI issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoppert committed Jan 14, 2017
1 parent 7d28842 commit c7851e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pandas/tests/plotting/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,6 @@ def test_plot_outofbounds_datetime(self):
self.plt.plot(values)

def test_format_timedelta_ticks_narrow(self):
import matplotlib.pyplot as plt

expected_labels = [
'00:00:00.00000000{:d}'.format(i)
Expand All @@ -1282,16 +1281,16 @@ def test_format_timedelta_ticks_narrow(self):
rng = timedelta_range('0', periods=10, freq='ns')
df = DataFrame(np.random.randn(len(rng), 3), rng)
ax = df.plot(fontsize=2)
plt.gcf().autofmt_xdate()
ax.get_figure().canvas.draw_idle()
fig = ax.get_figure()
fig.autofmt_xdate()
fig.canvas.draw()
labels = ax.get_xticklabels()
self.assertEqual(len(labels), len(expected_labels))
for l, l_expected in zip(labels, expected_labels):
self.assertEqual(l.get_text(), l_expected)
self.assertEqual(l.get_rotation(), 30)

def test_format_timedelta_ticks_wide(self):
import matplotlib.pyplot as plt

expected_labels = [
'00:00:00',
Expand All @@ -1308,8 +1307,9 @@ def test_format_timedelta_ticks_wide(self):
rng = timedelta_range('0', periods=10, freq='1 d')
df = DataFrame(np.random.randn(len(rng), 3), rng)
ax = df.plot(fontsize=2)
plt.gcf().autofmt_xdate()
ax.get_figure().canvas.draw_idle()
fig = ax.get_figure()
fig.autofmt_xdate()
fig.canvas.draw()
labels = ax.get_xticklabels()
self.assertEqual(len(labels), len(expected_labels))
for l, l_expected in zip(labels, expected_labels):
Expand Down

0 comments on commit c7851e3

Please sign in to comment.