Skip to content

Commit

Permalink
Error on warnings when testing (#620)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
dstansby and pre-commit-ci[bot] authored Nov 7, 2024
1 parent 0bb51de commit 6fb781b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
shell: "bash -l {0}"
run: |
conda activate env
python -m pip install "zfpy>=1" "numpy<2"
python -m pip install -v ".[zfpy]"
- name: List installed packages
shell: "bash -l {0}"
Expand Down
3 changes: 3 additions & 0 deletions numcodecs/tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def test_ensure_bytes_invalid_inputs():
ensure_bytes(e)


@pytest.mark.filterwarnings(
"ignore:The 'u' type code is deprecated and will be removed in Python 3.16"
)
def test_ensure_contiguous_ndarray_invalid_inputs():
# object array not allowed
a = np.array(['Xin chào thế giới'], dtype=object)
Expand Down
3 changes: 3 additions & 0 deletions numcodecs/tests/test_msgpacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def test_backwards_compatibility():
check_backwards_compatibility(codec.codec_id, arrays, [codec])


@pytest.mark.filterwarnings(
"ignore:Creating an ndarray from ragged nested sequences .* is deprecated.*"
)
@pytest.mark.parametrize(
("input_data", "dtype"),
[
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ norecursedirs = [
]
log_cli_level = "INFO"
xfail_strict = true
filterwarnings = [
"error",
]

[tool.cibuildwheel]
environment = { DISABLE_NUMCODECS_AVX2=1 }
[tool.cibuildwheel.macos]
Expand Down

0 comments on commit 6fb781b

Please sign in to comment.