Skip to content

Commit

Permalink
pydata#5740 follow up: supress xr.ufunc warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause committed Oct 29, 2021
1 parent 36f05d7 commit 4c8b551
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions xarray/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ def test_missing_methods(self):
except NotImplementedError as err:
assert "dask" in str(err)

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_univariate_ufunc(self):
u = self.eager_var
v = self.lazy_var
self.assertLazyAndAllClose(np.sin(u), xu.sin(v))

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_bivariate_ufunc(self):
u = self.eager_var
v = self.lazy_var
Expand Down Expand Up @@ -563,7 +563,7 @@ def duplicate_and_merge(array):
actual = duplicate_and_merge(self.lazy_array)
self.assertLazyAndEqual(expected, actual)

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_ufuncs(self):
u = self.eager_array
v = self.lazy_array
Expand Down
6 changes: 3 additions & 3 deletions xarray/tests/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ def test_unary_op(self):
assert_sparse_equal(abs(self.var).data, abs(self.data))
assert_sparse_equal(self.var.round().data, self.data.round())

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_univariate_ufunc(self):
assert_sparse_equal(np.sin(self.data), xu.sin(self.var).data)

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_bivariate_ufunc(self):
assert_sparse_equal(np.maximum(self.data, 0), xu.maximum(self.var, 0).data)
assert_sparse_equal(np.maximum(self.data, 0), xu.maximum(0, self.var).data)
Expand Down Expand Up @@ -664,7 +664,7 @@ def test_stack(self):
roundtripped = stacked.unstack()
assert_identical(arr, roundtripped)

@pytest.mark.filterwarnings("ignore::PendingDeprecationWarning")
@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_ufuncs(self):
x = self.sp_xr
assert_equal(np.sin(x), xu.sin(x))
Expand Down

0 comments on commit 4c8b551

Please sign in to comment.