From a97e43f152c5760f03399c39fa99ba6b592b38c8 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Mon, 16 Sep 2024 21:52:39 -0600 Subject: [PATCH] Catch DeprecationWarning from drop_dims Closes #8984 --- properties/test_index_manipulation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/properties/test_index_manipulation.py b/properties/test_index_manipulation.py index 77b7fcbcd99..3722a657813 100644 --- a/properties/test_index_manipulation.py +++ b/properties/test_index_manipulation.py @@ -1,4 +1,5 @@ import itertools +import warnings import numpy as np import pytest @@ -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: