Skip to content
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
24 changes: 22 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Run tests
run: pytest --doctest-modules --doctest-plus -v --pyargs nibabel -n auto

test:
tox:
# Check each OS, all supported Python, minimum versions and latest releases
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -227,6 +227,26 @@ jobs:
path: test-results.xml
if: ${{ always() }}

pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.14']
steps:
- name: Shallow checkout
uses: actions/checkout@v6
- name: Setup uv and Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install with pytest
run: uv sync --extra=test --extra=all
- name: Run test suite
run: python -m pytest

checks:
runs-on: 'ubuntu-slim'
continue-on-error: true
Expand Down Expand Up @@ -255,7 +275,7 @@ jobs:
publish:
runs-on: ubuntu-slim
environment: "Package deployment"
needs: [test, test-package]
needs: [tox, pytest, test-package]
permissions:
# Required for trusted publishing
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion nibabel/cmdline/tests/test_roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_entrypoint(capsys):
with pytest.raises(SystemExit):
main()
captured = capsys.readouterr()
assert captured.out.startswith('usage: nib-roi')
assert captured.out.startswith('usage: ')


def test_nib_roi_unknown_axes(capsys):
Expand Down
4 changes: 4 additions & 0 deletions nibabel/tests/test_removalschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,7 @@ def test_unremoved_object():
def test_unremoved_attr():
with pytest.raises(AssertionError):
test_attribute_removal()


if cmp_pkg_version('1.0.0') > -1:
pytest.skip('Shallow checkout, version unavailable', allow_module_level=True)
Loading