Skip to content

Commit 9157ed3

Browse files
authored
test: Fix warning emitted in backwards compatibility test (#113)
1 parent 296de6f commit 9157ed3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ module = ["pyarrow.*", "pytest_benchmark.*", "sklearn.*"]
8888
[tool.pytest.ini_options]
8989
addopts = "--import-mode=importlib --benchmark-skip"
9090
filterwarnings = [
91+
# By default, all warnings should yield errors
92+
"error",
9193
# Almost all tests are oblivious to the value of `nullable`. Let's ignore the warning as long as it exists.
9294
"ignore:The 'nullable' argument was not explicitly set:FutureWarning",
9395
]

tests/collection/test_read_write_parquet.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) QuantCo 2025-2025
22
# SPDX-License-Identifier: BSD-3-Clause
33

4+
import warnings
45
from collections.abc import Callable
56
from pathlib import Path
67
from typing import Any, TypeVar
@@ -345,7 +346,9 @@ def test_read_write_parquet_schema_json_fallback_corrupt(
345346

346347
# Act
347348
spy = mocker.spy(collection_type, "validate")
348-
_read_parquet(collection_type, tmp_path, lazy, validation=validation)
349+
with warnings.catch_warnings():
350+
warnings.simplefilter("ignore", category=UserWarning)
351+
_read_parquet(collection_type, tmp_path, lazy, validation=validation)
349352

350353
# Assert
351354
spy.assert_called_once()

0 commit comments

Comments
 (0)