Skip to content

Commit 5b50126

Browse files
committed
MNT: Clean up out-dated handling for older dep versions
Not needed since we dropped support for these older versions.
1 parent 5b04cd5 commit 5b50126

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

src/metpy/units.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ def setup_registry(reg):
7575
if pre not in reg.preprocessors:
7676
reg.preprocessors.append(pre)
7777

78-
# Add a percent unit if it's not already present, it was added in 0.21
79-
if 'percent' not in reg:
80-
reg.define('percent = 0.01 = %')
81-
8278
# Define commonly encountered units not defined by pint
8379
reg.define('degrees_north = degree = degrees_N = degreesN = degree_north = degree_N '
8480
'= degreeN')

tests/calc/test_indices.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from metpy.calc import (bulk_shear, bunkers_storm_motion, corfidi_storm_motion, critical_angle,
1313
mean_pressure_weighted, precipitable_water, significant_tornado,
1414
supercell_composite, weighted_continuous_average)
15-
from metpy.testing import (assert_almost_equal, assert_array_almost_equal, get_upper_air_data,
16-
version_check)
15+
from metpy.testing import assert_almost_equal, assert_array_almost_equal, get_upper_air_data
1716
from metpy.units import concatenate, units
1817

1918

@@ -131,7 +130,6 @@ def test_weighted_continuous_average():
131130
assert_almost_equal(v, 6.900543760612305 * units('m/s'), 7)
132131

133132

134-
@pytest.mark.xfail(condition=version_check('pint<0.21'), reason='hgrecco/pint#1593')
135133
def test_weighted_continuous_average_temperature():
136134
"""Test pressure-weighted mean temperature function with vertical interpolation."""
137135
data = get_upper_air_data(datetime(2016, 5, 22, 0), 'DDC')

tests/plots/test_skewt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ def test_hodograph_api():
321321
return fig
322322

323323

324-
@pytest.mark.mpl_image_compare(
325-
remove_text=True, tolerance=0.6 if version_check('matplotlib==3.5') else 0.)
324+
@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.)
326325
def test_hodograph_units():
327326
"""Test passing quantities to Hodograph."""
328327
fig = plt.figure(figsize=(9, 9))

tests/plots/test_util.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import xarray as xr
1212

1313
from metpy.plots import add_metpy_logo, add_timestamp, add_unidata_logo, convert_gempak_color
14-
from metpy.testing import autoclose_figure, get_test_data, version_check
14+
from metpy.testing import autoclose_figure, get_test_data
1515

1616

1717
@pytest.mark.mpl_image_compare(tolerance=2.638, remove_text=True)
@@ -90,9 +90,7 @@ def test_add_logo_invalid_size():
9090
add_metpy_logo(fig, size='jumbo')
9191

9292

93-
@pytest.mark.mpl_image_compare(
94-
tolerance=1.072 if version_check('matplotlib<3.5') else 0,
95-
remove_text=True)
93+
@pytest.mark.mpl_image_compare(tolerance=0, remove_text=True)
9694
def test_gempak_color_image_compare():
9795
"""Test creating a plot with all the GEMPAK colors."""
9896
c = range(32)
@@ -111,9 +109,7 @@ def test_gempak_color_image_compare():
111109
return fig
112110

113111

114-
@pytest.mark.mpl_image_compare(
115-
tolerance=1.215 if version_check('matplotlib<3.5') else 0,
116-
remove_text=True)
112+
@pytest.mark.mpl_image_compare(tolerance=0, remove_text=True)
117113
def test_gempak_color_xw_image_compare():
118114
"""Test creating a plot with all the GEMPAK colors using xw style."""
119115
c = range(32)

0 commit comments

Comments
 (0)