Skip to content

Commit

Permalink
Stateful test: silence DeprecationWarning from drop_dims (#9508)
Browse files Browse the repository at this point in the history
Closes #8984
  • Loading branch information
dcherian committed Sep 17, 2024
1 parent ef42335 commit 1c6300c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion properties/test_index_manipulation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import itertools
import warnings

import numpy as np
import pytest
Expand Down Expand Up @@ -184,7 +185,10 @@ def drop_dims(self, data):
)
)
note(f"> drop_dims: {dims}")
self.dataset = self.dataset.drop_dims(dims)
# TODO: dropping a multi-index dimension raises a DeprecationWarning
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=DeprecationWarning)
self.dataset = self.dataset.drop_dims(dims)

for dim in dims:
if dim in self.indexed_dims:
Expand Down

0 comments on commit 1c6300c

Please sign in to comment.