Skip to content

chore(tox): Fix pre-release options #1416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions nibabel/tests/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""Testing processing module"""

import logging
import warnings
from os.path import dirname
from os.path import join as pjoin

Expand Down Expand Up @@ -169,7 +170,8 @@ def test_resample_from_to(caplog):
exp_out[1:, :, :] = data[1, :, :]
assert_almost_equal(out.dataobj, exp_out)
out = resample_from_to(img, trans_p_25_img)
with pytest.warns(UserWarning): # Suppress scipy warning
with warnings.catch_warnings():
warnings.simplefilter('ignore', UserWarning)
exp_out = spnd.affine_transform(data, [1, 1, 1], [-0.25, 0, 0], order=3)
assert_almost_equal(out.dataobj, exp_out)
# Test cval
Expand Down Expand Up @@ -275,7 +277,8 @@ def test_resample_to_output(caplog):
assert_array_equal(out_img.dataobj, np.flipud(data))
# Subsample voxels
out_img = resample_to_output(Nifti1Image(data, np.diag([4, 5, 6, 1])))
with pytest.warns(UserWarning): # Suppress scipy warning
with warnings.catch_warnings():
warnings.simplefilter('ignore', UserWarning)
exp_out = spnd.affine_transform(data, [1 / 4, 1 / 5, 1 / 6], output_shape=(5, 11, 19))
assert_array_equal(out_img.dataobj, exp_out)
# Unsubsample with voxel sizes
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ pass_env =
py313t-x86: UV_PYTHON
set_env =
pre: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pre: UV_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pre: UV_INDEX=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pre: UV_INDEX_STRATEGY=unsafe-best-match
py313t: PYTHONGIL={env:PYTHONGIL:0}
extras =
test
Expand Down