diff --git a/doc/api/next_api_changes/removals/18202-DS.rst b/doc/api/next_api_changes/removals/18202-DS.rst new file mode 100644 index 000000000000..840c28010bfe --- /dev/null +++ b/doc/api/next_api_changes/removals/18202-DS.rst @@ -0,0 +1,6 @@ +`matplotlib.testing` removals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ``testing.is_called_from_pytest`` has been removed. +- ``jpl_units.Unitdbl.checkUnits`` has been removed. Use + ``units not in self.allowed`` instead. diff --git a/lib/matplotlib/testing/__init__.py b/lib/matplotlib/testing/__init__.py index 43f8b27ad4f9..9c9c728b7c14 100644 --- a/lib/matplotlib/testing/__init__.py +++ b/lib/matplotlib/testing/__init__.py @@ -11,12 +11,6 @@ _log = logging.getLogger(__name__) -@cbook.deprecated("3.2") -def is_called_from_pytest(): - """Whether we are in a pytest run.""" - return getattr(mpl, '_called_from_pytest', False) - - def set_font_settings_for_testing(): mpl.rcParams['font.family'] = 'DejaVu Sans' mpl.rcParams['text.hinting'] = 'none' diff --git a/lib/matplotlib/testing/jpl_units/UnitDbl.py b/lib/matplotlib/testing/jpl_units/UnitDbl.py index 645bc6f6600e..14d77cd8faf7 100644 --- a/lib/matplotlib/testing/jpl_units/UnitDbl.py +++ b/lib/matplotlib/testing/jpl_units/UnitDbl.py @@ -228,22 +228,6 @@ def range(start, stop, step=None): return elems - @cbook.deprecated("3.2") - def checkUnits(self, units): - """ - Check to see if some units are valid. - - = ERROR CONDITIONS - - If the input units are not in the allowed list, an error is thrown. - - = INPUT VARIABLES - - units The string name of the units to check. - """ - if units not in self.allowed: - raise ValueError("Input units '%s' are not one of the supported " - "types of %s" % ( - units, list(self.allowed.keys()))) - def checkSameUnits(self, rhs, func): """ Check to see if units are the same.