Skip to content

Commit 91bfb45

Browse files
authored
Merge pull request nipreps#535 from mgxd/fix/package-data
FIX: sentinel path
2 parents fe90598 + b61a865 commit 91bfb45

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ jobs:
214214
docker run -u $( id -u ) -it --rm=false -w /src/niworkflows \
215215
-e COVERAGE_FILE=/tmp/summaries/.pytest.coverage \
216216
-e TEST_DATA_HOME=/data -v /tmp/data:/data \
217+
-e FS_LICENSE=/etc/fslicense.txt \
218+
-v /tmp/fslicense/license.txt:/etc/fslicense.txt:ro \
217219
-v ${PWD}:/tmp niworkflows:latest \
218220
pytest --junit-xml=/tmp/summaries/pytest.xml \
219221
--cov niworkflows --cov-report xml:/tmp/summaries/unittests.xml \

niworkflows/utils/tests/test_misc.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Test misc module."""
2+
import os
3+
import shutil
24
from unittest import mock
35

46
import pytest
@@ -30,3 +32,17 @@ def test_fs_license_check(stdout, rc, valid):
3032
mocked_run.return_value.stdout = stdout
3133
mocked_run.return_value.returncode = rc
3234
assert check_valid_fs_license() is valid
35+
36+
37+
@pytest.mark.skipif(not os.getenv("FS_LICENSE"), reason="No FS license found")
38+
def test_fs_license_check2(monkeypatch):
39+
"""Execute the canary itself."""
40+
assert check_valid_fs_license() is True
41+
42+
43+
@pytest.mark.skipif(shutil.which('mri_convert') is None, reason="FreeSurfer not installed")
44+
def test_fs_license_check3(monkeypatch):
45+
with monkeypatch.context() as m:
46+
m.delenv("FS_LICENSE", raising=False)
47+
m.delenv("FREESURFER_HOME", raising=False)
48+
assert check_valid_fs_license() is False

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ console_scripts =
5656
niworkflows =
5757
data/*.txt
5858
data/*.json
59-
niworkflows/data/sentinel.nii.gz
59+
data/sentinel.nii.gz
6060
reports/default.yml
6161
reports/report.tpl
6262

0 commit comments

Comments
 (0)