Skip to content

Commit

Permalink
MNT: Fix xpass and make xpass fail suite
Browse files Browse the repository at this point in the history
The fix in pint for the original issue has been released, so we can
have a condition on the xpass.
  • Loading branch information
dopplershift committed Nov 10, 2023
1 parent 1ceb62c commit 3a6cfd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ markers = "xfail_dask: marks tests as expected to fail with Dask arrays"
norecursedirs = "build docs .idea"
doctest_optionflags = "NORMALIZE_WHITESPACE"
mpl-results-path = "test_output"
xfail_strict = true
filterwarnings = [
"ignore:numpy.ndarray size changed:RuntimeWarning",
# To be removed in the next python-dateutil release.
Expand Down
5 changes: 4 additions & 1 deletion tests/calc/test_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from datetime import datetime

import numpy as np
import packaging.version
import pint
import pytest
import xarray as xr

Expand Down Expand Up @@ -130,7 +132,8 @@ def test_weighted_continuous_average():
assert_almost_equal(v, 6.900543760612305 * units('m/s'), 7)


@pytest.mark.xfail(reason='hgrecco/pint#1593')
@pytest.mark.xfail(packaging.version.parse(pint.__version__) < packaging.version.parse('0.21'),
reason='hgrecco/pint#1593')
def test_weighted_continuous_average_temperature():
"""Test pressure-weighted mean temperature function with vertical interpolation."""
data = get_upper_air_data(datetime(2016, 5, 22, 0), 'DDC')
Expand Down

0 comments on commit 3a6cfd3

Please sign in to comment.