Skip to content

Commit

Permalink
Merge branch 'fix-test-skip' into 'release'
Browse files Browse the repository at this point in the history
test: update test to remove skip

See merge request 3d/PandoraBox/pandora2d!143
  • Loading branch information
lecontm committed Aug 14, 2024
2 parents a058763 + 5e40f13 commit c68d099
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,8 @@ def mock_set_out_of_disparity_range_to_nan(self, mock_type, mocker: MockerFixtur
"""
if mock_type == "not used":
return mocker.patch(
"pandora2d.common.set_out_of_row_disparity_range_to_other_value",
side_effect=lambda x, y, z, k: x,
"pandora2d.matching_cost.matching_cost.set_out_of_row_disparity_range_to_other_value",
side_effect=lambda x, y, z, k, p: x,
)
if mock_type != "used":
raise ValueError(f"Expected mock_type to be 'used' or 'not used', got {mock_type}.")
Expand Down Expand Up @@ -783,7 +783,6 @@ def test_effect_on_compute_cost_volume(self, disparity_maps, disparity_to_alter,
assert np.all(result[:, :col_index] == 0)
assert np.all(result[:, col_index + 1 :] == 0)

@pytest.mark.skip(reason="mocker does not work")
@pytest.mark.parametrize("mock_type", ["not used"])
def test_when_not_taken_into_account(
self, disparity_maps, disparity_to_alter, mock_set_out_of_disparity_range_to_nan
Expand All @@ -795,6 +794,7 @@ def test_when_not_taken_into_account(
result = disparity_maps[disparity_to_alter]

assert np.all(result == 0)
assert mock_set_out_of_disparity_range_to_nan.called


class TestSubpix:
Expand Down

0 comments on commit c68d099

Please sign in to comment.