Skip to content

Commit

Permalink
Ignore Pandas DeprecationWarning in tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
padraic-shafer committed Mar 7, 2024
1 parent 31c306f commit 45608d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tiled/_tests/test_writing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 45608d8

Please sign in to comment.