From 1c6300c415efebac15f5ee668a3ef6419dbeab63 Mon Sep 17 00:00:00 2001
From: Deepak Cherian <dcherian@users.noreply.github.com>
Date: Mon, 16 Sep 2024 22:10:13 -0600
Subject: [PATCH] Stateful test: silence DeprecationWarning from drop_dims
 (#9508)

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: