From f77735b1b4cfbab04261f3b0b86d354ec6abcd7c Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 27 Mar 2018 18:47:14 -0700 Subject: [PATCH] Deprecate ImageComparisonTest. It's a weird leftover at that point that tries to set up a nose test class but uses pytest markers (via e.g. _checked_on_freetype_version, which uses _knownfailureif, which itself unconditionally relies on pytest) -- basically, it can't actually be used for nose-based testing unless nose somehow learns to interpret pytest markers. A (fairly trivial...) PR has been opened on pytest-mpl to fix their use. --- doc/api/next_api_changes/2018-02-15-AL-deprecations.rst | 5 +++-- lib/matplotlib/testing/decorators.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/next_api_changes/2018-02-15-AL-deprecations.rst b/doc/api/next_api_changes/2018-02-15-AL-deprecations.rst index 3597544560b7..e41e8957a48b 100644 --- a/doc/api/next_api_changes/2018-02-15-AL-deprecations.rst +++ b/doc/api/next_api_changes/2018-02-15-AL-deprecations.rst @@ -11,7 +11,7 @@ The following modules are deprecated: The following classes, methods, functions, and attributes are deprecated: - ``afm.parse_afm``, -- ``Annotation.arrow``, +- ``backend_wx.FigureCanvasWx.macros``, - ``cbook.GetRealpathAndStat``, ``cbook.Locked``, - ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead), ``cbook.listFiles``, ``cbook.unicode_safe`` @@ -19,8 +19,9 @@ The following classes, methods, functions, and attributes are deprecated: - ``dates.DateFormatter.strftime_pre_1900``, ``dates.DateFormatter.strftime``, - ``font_manager.TempCache``, - ``mathtext.unichr_safe`` (use ``chr`` instead), -- ``FigureCanvasWx.macros``, +- ``testing.ImageComparisonTest``, - ``texmanager.dvipng_hack_alpha``, +- ``text.Annotation.arrow``, The following rcParams are deprecated: - ``pgf.debug`` (the pgf backend relies on logging), diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py index 02adda55d508..df80c150d353 100644 --- a/lib/matplotlib/testing/decorators.py +++ b/lib/matplotlib/testing/decorators.py @@ -251,6 +251,7 @@ def compare(self, idx, baseline, extension): _raise_on_image_difference(expected_fname, actual_fname, self.tol) +@cbook.deprecated("3.0") class ImageComparisonTest(CleanupTest, _ImageComparisonBase): """ Nose-based image comparison class