From 45608d8bb31e4434a230ee16fe5e71559d5a5906 Mon Sep 17 00:00:00 2001 From: Padraic Shafer Date: Thu, 7 Mar 2024 06:53:58 -0800 Subject: [PATCH] Ignore Pandas DeprecationWarning in tests? --- tiled/_tests/test_writing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tiled/_tests/test_writing.py b/tiled/_tests/test_writing.py index 83813c757..5d80070fd 100644 --- a/tiled/_tests/test_writing.py +++ b/tiled/_tests/test_writing.py @@ -25,6 +25,10 @@ from ..validation_registration import ValidationRegistry from .utils import fail_with_status_code +WARNING_PANDAS_BLOCKS = ( + "DataFrame._data is deprecated and will be removed in a future version. " + "Use public APIs instead." +) validation_registry = ValidationRegistry() validation_registry.register("SomeSpec", lambda *args, **kwargs: None) @@ -112,6 +116,7 @@ def test_write_array_chunked(tree): assert result.specs == specs +# @pytest.mark.filterwarnings(f"ignore:{WARNING_PANDAS_BLOCKS}:DeprecationWarning") def test_write_dataframe_full(tree): with Context.from_app( build_app(tree, validation_registry=validation_registry) @@ -137,6 +142,7 @@ def test_write_dataframe_full(tree): assert result.specs == specs +# @pytest.mark.filterwarnings(f"ignore:{WARNING_PANDAS_BLOCKS}:DeprecationWarning") def test_write_dataframe_partitioned(tree): with Context.from_app( build_app(tree, validation_registry=validation_registry) @@ -390,6 +396,7 @@ async def test_delete_non_empty_node(tree): client.delete("a") +# @pytest.mark.filterwarnings(f"ignore:{WARNING_PANDAS_BLOCKS}:DeprecationWarning") @pytest.mark.asyncio async def test_write_in_container(tree): "Create a container and write a structure into it."