11"""Unit tests for functional workflow."""
22
3+ import shutil
4+ import pytest
35from types import SimpleNamespace
46
57from niwrap import afni
68
79from rbc .core import functional
810
11+ DOCKER_MISSING = shutil .which ("docker" ) is None
912
1013class TestFuncInitialization :
1114 """Test suite for functional workflow initialization."""
@@ -16,6 +19,7 @@ def test_truncate_string_logic(self) -> None:
1619 selector = f"[{ start_tr } ..$]"
1720 assert selector == "[4..$]"
1821
22+ @pytest .mark .skipif (DOCKER_MISSING , reason = "Docker is required" )
1923 def test_truncate_to_min_volume (self , test_subject : SimpleNamespace ) -> None :
2024 """Test truncating to minimum volume count of 1."""
2125 original_info = afni .v_3dinfo (dataset = [test_subject .bold ], nv = True )
@@ -41,6 +45,7 @@ def test_middle_index_logic(self) -> None:
4145 results = [nv // 2 for nv in volumes_list ]
4246 assert results == [50 , 50 , 1 , 0 ]
4347
48+ @pytest .mark .skipif (DOCKER_MISSING , reason = "Docker is required" )
4449 def test_motion_reference_volume_count (self , test_subject : SimpleNamespace ) -> None :
4550 """Test motion reference volume count is 1."""
4651 reference = functional .generate_motion_reference (
0 commit comments