8000 Merge pull request #18202 from dstansby/test-depr · matplotlib/matplotlib@ff821ba · GitHub
[go: up one dir, main page]

Skip to content

Commit ff821ba

Browse files
authored
Merge pull request #18202 from dstansby/test-depr
Remove mpl.testing deprecations for 3.4
2 parents 2855691 + 9ad0acf commit ff821ba

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
`matplotlib.testing` removals
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
- ``testing.is_called_from_pytest`` has been removed.
5+
- ``jpl_units.Unitdbl.checkUnits`` has been removed. Use
6+
``units not in self.allowed`` instead.

lib/matplotlib/testing/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
_log = logging.getLogger(__name__)
1212

1313

14-
@cbook.deprecated("3.2")
15-
def is_called_from_pytest():
16-
"""Whether we are in a pytest run."""
17-
return getattr(mpl, '_called_from_pytest', False)
18-
19-
2014
def set_font_settings_for_testing():
2115
mpl.rcParams['font.family'] = 'DejaVu Sans'
2216
mpl.rcParams['text.hinting'] = 'none'

lib/matplotlib/testing/jpl_units/UnitDbl.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -228,22 +228,6 @@ def range(start, stop, step=None):
228228

229229
return elems
230230

231-
@cbook.deprecated("3.2")
232-
def checkUnits(self, units):
233-
"""
234-
Check to see if some units are valid.
235-
236-
= ERROR CONDITIONS
237-
- If the input units are not in the allowed list, an error is thrown.
238-
239-
= INPUT VARIABLES
240-
- units The string name of the units to check.
241-
"""
242-
if units not in self.allowed:
243-
raise ValueError("Input units '%s' are not one of the supported "
244-
"types of %s" % (
245-
units, list(self.allowed.keys())))
246-
247231
def checkSameUnits(self, rhs, func):
248232
"""
249233
Check to see if units are the same.

0 commit comments

Comments
 (0)
0