Skip to content

Commit 9fff73f

Browse files
committed
Merge pull request #7153 from cpcloud/test-compat-2.6-7152
BUG/COMPAT: test compat on Python 2.6
2 parents b550b1b + fab11c1 commit 9fff73f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/tests/test_graphics.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,8 @@ def test_boxplot(self):
13641364

13651365
# Multiple columns with an ax argument is not supported
13661366
fig, ax = self.plt.subplots()
1367-
self.assertRaisesRegexp(
1368-
ValueError, 'existing axis', df.boxplot,
1369-
column=['Col1', 'Col2'], by='X', ax=ax
1370-
)
1367+
with tm.assertRaisesRegexp(ValueError, 'existing axis'):
1368+
df.boxplot(column=['Col1', 'Col2'], by='X', ax=ax)
13711369

13721370
# When by is None, check that all relevant lines are present in the dict
13731371
fig, ax = self.plt.subplots()

pandas/tseries/plotting.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,17 @@ def tsplot(series, plotf, **kwargs):
7575
args.append(style)
7676

7777
lines = plotf(ax, *args, **kwargs)
78-
label = kwargs.get('label', None)
7978

8079
# set date formatter, locators and rescale limits
8180
format_dateaxis(ax, ax.freq)
8281
left, right = _get_xlim(ax.get_lines())
8382
ax.set_xlim(left, right)
8483

8584
# x and y coord info
86-
ax.format_coord = lambda t, y: "t = {} y = {:8f}".format(Period(ordinal=int(t), freq=ax.freq), y)
85+
ax.format_coord = lambda t, y: ("t = {0} "
86+
"y = {1:8f}".format(Period(ordinal=int(t),
87+
freq=ax.freq),
88+
y))
8789

8890
return lines
8991

0 commit comments

Comments
 (0)