Skip to content

Commit 1c6300c

Browse files
authored
Stateful test: silence DeprecationWarning from drop_dims (#9508)
Closes #8984
1 parent ef42335 commit 1c6300c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

properties/test_index_manipulation.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import itertools
2+
import warnings
23

34
import numpy as np
45
import pytest
@@ -184,7 +185,10 @@ def drop_dims(self, data):
184185
)
185186
)
186187
note(f"> drop_dims: {dims}")
187-
self.dataset = self.dataset.drop_dims(dims)
188+
# TODO: dropping a multi-index dimension raises a DeprecationWarning
189+
with warnings.catch_warnings():
190+
warnings.simplefilter("ignore", category=DeprecationWarning)
191+
self.dataset = self.dataset.drop_dims(dims)
188192

189193
for dim in dims:
190194
if dim in self.indexed_dims:

0 commit comments

Comments
 (0)