Skip to content

Commit 6fb781b

Browse files
Error on warnings when testing (#620)
* Error on warnings when testing * Ignore Python 3.13 warning * Use extra to install zfpy * Filter ragged warning * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0bb51de commit 6fb781b

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
shell: "bash -l {0}"
7878
run: |
7979
conda activate env
80-
python -m pip install "zfpy>=1" "numpy<2"
80+
python -m pip install -v ".[zfpy]"
8181
8282
- name: List installed packages
8383
shell: "bash -l {0}"

numcodecs/tests/test_compat.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def test_ensure_bytes_invalid_inputs():
6464
ensure_bytes(e)
6565

6666

67+
@pytest.mark.filterwarnings(
68+
"ignore:The 'u' type code is deprecated and will be removed in Python 3.16"
69+
)
6770
def test_ensure_contiguous_ndarray_invalid_inputs():
6871
# object array not allowed
6972
a = np.array(['Xin chào thế giới'], dtype=object)

numcodecs/tests/test_msgpacks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def test_backwards_compatibility():
5555
check_backwards_compatibility(codec.codec_id, arrays, [codec])
5656

5757

58+
@pytest.mark.filterwarnings(
59+
"ignore:Creating an ndarray from ragged nested sequences .* is deprecated.*"
60+
)
5861
@pytest.mark.parametrize(
5962
("input_data", "dtype"),
6063
[

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ norecursedirs = [
128128
]
129129
log_cli_level = "INFO"
130130
xfail_strict = true
131+
filterwarnings = [
132+
"error",
133+
]
134+
131135
[tool.cibuildwheel]
132136
environment = { DISABLE_NUMCODECS_AVX2=1 }
133137
[tool.cibuildwheel.macos]

0 commit comments

Comments
 (0)