BUG/TST: fix failing tests with dev versions of pandas and matplotlib (#1588)

* BUG/TST: fix failing tests with dev versions of pandas and matplotlib

* fixup
This commit is contained in:
Joris Van den Bossche
2020-08-26 12:34:16 +01:00
committed by GitHub
parent d8dcd7b3c1
commit 90b37eb377
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1035,7 +1035,7 @@ class GeometryArray(ExtensionArray):
ovalues = [param] * len(self)
return ovalues
if isinstance(other, (pd.Series, pd.Index)):
if isinstance(other, (pd.Series, pd.Index, pd.DataFrame)):
# rely on pandas to unbox and dispatch to us
return NotImplemented
+3 -3
View File
@@ -188,7 +188,7 @@ class TestPointPlotting:
# the colorbar matches the Point colors
ax = self.df.plot(column="values", cmap="RdYlGn", legend=True)
point_colors = ax.collections[0].get_facecolors()
cbar_colors = ax.get_figure().axes[1].collections[0].get_facecolors()
cbar_colors = ax.get_figure().axes[1].collections[-1].get_facecolors()
# first point == bottom of colorbar
np.testing.assert_array_equal(point_colors[0], cbar_colors[0])
# last point == top of colorbar
@@ -198,7 +198,7 @@ class TestPointPlotting:
# the colorbar matches the Point colors
ax = self.df.plot(column="values", categorical=True, legend=True)
point_colors = ax.collections[0].get_facecolors()
cbar_colors = ax.get_legend().axes.collections[0].get_facecolors()
cbar_colors = ax.get_legend().axes.collections[-1].get_facecolors()
# first point == bottom of colorbar
np.testing.assert_array_equal(point_colors[0], cbar_colors[0])
# last point == top of colorbar
@@ -211,7 +211,7 @@ class TestPointPlotting:
)
ax = self.df[1:].plot(column="exp", cmap="RdYlGn", legend=True, norm=norm)
point_colors = ax.collections[0].get_facecolors()
cbar_colors = ax.get_figure().axes[1].collections[0].get_facecolors()
cbar_colors = ax.get_figure().axes[1].collections[-1].get_facecolors()
# first point == bottom of colorbar
np.testing.assert_array_equal(point_colors[0], cbar_colors[0])
# last point == top of colorbar