Skip to content

Commit 87f2c66

Browse files
committed
tests pass on my mac computer
1 parent f45122f commit 87f2c66

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Install dependencies
4141
run: |
4242
pip install . && pip uninstall -y biobuddy
43-
pip install scipy numpy lxml ezc3d
43+
pip install scipy==1.15.2 numpy==1.25.2 lxml ezc3d
4444
4545
- name: Install test dependencies
4646
run: |

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install dependencies
6363
run: |
6464
pip install . && pip uninstall -y biobuddy
65-
pip install scipy==1.15.1 numpy==1.25.2 lxml ezc3d matplotlib
65+
pip install scipy==1.15.2 numpy==1.25.2 lxml ezc3d matplotlib
6666
6767
- name: Install test dependencies
6868
run: |

tests/test_joint_center_tool.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_score_and_sara_without_ghost_segments(initialize_whole_trial_reconstruc
244244
new_marker_position_diff = hip_c3d.get_position(list(marker_weights.keys())) - new_markers_reconstructed
245245
new_marker_tracking_error = np.sum(new_marker_position_diff[:3, :, :] ** 2)
246246

247-
npt.assert_almost_equal(original_marker_tracking_error, 1.2695623487402687)
247+
npt.assert_almost_equal(original_marker_tracking_error, 1.2695623487402687, decimal=5)
248248
if initialize_whole_trial_reconstruction:
249249
npt.assert_almost_equal(new_marker_tracking_error, 0.854628320760068, decimal=5)
250250
else:
@@ -284,7 +284,7 @@ def test_score_and_sara_without_ghost_segments(initialize_whole_trial_reconstruc
284284
new_marker_position_diff = knee_c3d.get_position(marker_names)[:3, :, :] - new_markers_reconstructed
285285
new_marker_tracking_error = np.sum(new_marker_position_diff**2)
286286

287-
npt.assert_almost_equal(original_marker_tracking_error, 4.705484147753087)
287+
npt.assert_almost_equal(original_marker_tracking_error, 4.705484147753087, decimal=5)
288288
if initialize_whole_trial_reconstruction:
289289
npt.assert_almost_equal(new_marker_tracking_error, 3.195043059038364, decimal=5)
290290
else:
@@ -383,6 +383,7 @@ def test_score_and_sara_with_ghost_segments():
383383
[0.0, 0.0, 0.0, 1.0],
384384
]
385385
),
386+
decimal=5,
386387
)
387388
assert score_model.segments["femur_r"].segment_coordinate_system.is_in_local
388389
npt.assert_almost_equal(
@@ -395,6 +396,7 @@ def test_score_and_sara_with_ghost_segments():
395396
[0.0, 0.0, 0.0, 1.0],
396397
]
397398
),
399+
decimal=5,
398400
)
399401

400402
assert score_model.segments["tibia_r_parent_offset"].segment_coordinate_system.is_in_local
@@ -408,6 +410,7 @@ def test_score_and_sara_with_ghost_segments():
408410
[0.0, 0.0, 0.0, 1.0],
409411
]
410412
),
413+
decimal=5,
411414
)
412415

413416
assert score_model.segments["tibia_r"].segment_coordinate_system.is_in_local
@@ -463,7 +466,7 @@ def test_score_and_sara_with_ghost_segments():
463466
new_marker_tracking_error = np.sum(new_marker_position_diff[:3, :, :] ** 2)
464467

465468
# The error is worse because it is a small test (for the tests to run quickly)
466-
npt.assert_almost_equal(original_marker_tracking_error, 0.2879320932283139)
469+
npt.assert_almost_equal(original_marker_tracking_error, 0.2879320932283139, decimal=5)
467470
npt.assert_almost_equal(new_marker_tracking_error, 1.1186398837289024, decimal=5)
468471

469472
# Knee
@@ -492,7 +495,7 @@ def test_score_and_sara_with_ghost_segments():
492495
new_marker_tracking_error = np.sum(new_marker_position_diff**2)
493496

494497
# The error is worse because it is a unit test (for the tests to run quickly)
495-
npt.assert_almost_equal(original_marker_tracking_error, 9.956010278714874)
498+
npt.assert_almost_equal(original_marker_tracking_error, 9.956010278714874, decimal=5)
496499
npt.assert_almost_equal(new_marker_tracking_error, 10.58025762257233, decimal=5)
497500

498501
remove_temporary_biomods()

0 commit comments

Comments
 (0)