Skip to content

image_comparison decorator refactor #7097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed figures/baselines count mismatch
  • Loading branch information
Kojoley committed Sep 16, 2016
commit 626398dfb28354e9b84dcb38f42292d4a87d14fb
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from matplotlib.image import imread
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib.testing import skip
from matplotlib.testing.decorators import (
cleanup, image_comparison, knownfailureif)
from matplotlib import pyplot as plt
Expand Down Expand Up @@ -251,7 +252,7 @@ def process_image(self, padded_src, dpi):
return t2

if V(np.__version__) < V('1.7.0'):
return
skip('Disabled on Numpy < 1.7.0')

fig = plt.figure()
ax = fig.add_subplot(111)
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ def test_hist2d_transpose():
ax.hist2d(x, y, bins=10)


@image_comparison(baseline_images=['scatter', 'scatter'])
@image_comparison(baseline_images=['scatter'])
def test_scatter_plot():
ax = plt.axes()
data = {"x": [3, 4, 2, 6], "y": [2, 5, 2, 3], "c": ['r', 'y', 'b', 'lime'],
Expand Down Expand Up @@ -1375,8 +1375,8 @@ def _as_mpl_axes(self):
@image_comparison(baseline_images=['log_scales'])
def test_log_scales():
fig = plt.figure()
ax = plt.gca()
plt.plot(np.log(np.linspace(0.1, 100)))
ax = fig.add_subplot(1, 1, 1)
ax.plot(np.log(np.linspace(0.1, 100)))
ax.set_yscale('log', basey=5.5)
ax.invert_yaxis()
ax.set_xscale('log', basex=9.0)
Expand Down