Skip to content

Commit 77d732e

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 77d732e

4 files changed

Lines changed: 3 additions & 13 deletions

File tree

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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def test_weighted_continuous_average():
131131
assert_almost_equal(v, 6.900543760612305 * units('m/s'), 7)
132132

133133

134-
@pytest.mark.xfail(condition=version_check('pint<0.21'), reason='hgrecco/pint#1593')
135134
def test_weighted_continuous_average_temperature():
136135
"""Test pressure-weighted mean temperature function with vertical interpolation."""
137136
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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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)