diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42c99cb2f..f659600a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,7 @@ jobs: - name: Run tests run: | export C_INCLUDE_PATH=$pythonLocation/include/python${{ steps.python-selector.outputs.python-version }}:$C_INCLUDE_PATH - pytest --cov-report term-missing:skip-covered + pytest -n logical --dist worksteal --cov-report term-missing:skip-covered - name: Save test results and coverage uses: actions/upload-artifact@v4 diff --git a/pytest.ini b/pytest.ini index 6983f0058..0dec21a22 100644 --- a/pytest.ini +++ b/pytest.ini @@ -28,6 +28,7 @@ required_plugins = pytest-mock pytest-html pytest-cov + pytest-xdist junit_logging = out-err diff --git a/requirements.txt b/requirements.txt index d946292e5..cf376d3c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,6 +35,8 @@ pybids==0.16.* pyparsing==3.0.* PySocks==1.7.* pytest==7.2.* +pytest-xdist==3.6.* +pytest-xdist[psutil]==3.6.* pytest-console-scripts==1.3.* pytest-cov==4.1.0 pytest-html==4.1.1 diff --git a/scilpy/tractograms/tests/test_streamline_and_mask_operations.py b/scilpy/tractograms/tests/test_streamline_and_mask_operations.py index 772c41a6a..6127a586a 100644 --- a/scilpy/tractograms/tests/test_streamline_and_mask_operations.py +++ b/scilpy/tractograms/tests/test_streamline_and_mask_operations.py @@ -92,7 +92,7 @@ def test_get_endpoints_density_map_five_points(): result = nib.load(in_result).get_fdata() - assert np.allclose(endpoints_map, result) + assert np.allclose(endpoints_map, result, rtol=1e-03) def test_get_head_tail_density_maps(): diff --git a/scripts/scil_connectivity_compute_simple_matrix.py b/scripts/scil_connectivity_compute_simple_matrix.py old mode 100644 new mode 100755 diff --git a/scripts/scil_fibertube_score_tractogram.py b/scripts/scil_fibertube_score_tractogram.py old mode 100644 new mode 100755 diff --git a/scripts/scil_fibertube_tracking.py b/scripts/scil_fibertube_tracking.py old mode 100644 new mode 100755 diff --git a/scripts/scil_tractogram_filter_collisions.py b/scripts/scil_tractogram_filter_collisions.py old mode 100644 new mode 100755 diff --git a/scripts/scil_viz_tractogram_collisions.py b/scripts/scil_viz_tractogram_collisions.py old mode 100644 new mode 100755 diff --git a/scripts/tests/test_aodf_metrics.py b/scripts/tests/test_aodf_metrics.py index a242e060b..54a94655d 100644 --- a/scripts/tests/test_aodf_metrics.py +++ b/scripts/tests/test_aodf_metrics.py @@ -73,5 +73,5 @@ def test_execution_symmetric_input(script_runner, monkeypatch): ret = script_runner.run('scil_aodf_metrics.py', in_fodf, '--sphere', 'repulsion100', '--not_all', '--nufid', 'nufid.nii.gz', - '--processes', '4') + '--processes', '1') assert not ret.success