Skip to content

Commit

Permalink
fix broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
senselessdev1 committed Mar 18, 2024
1 parent 32d5801 commit daf37c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_two_view_estimator_cacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_cache_miss(

def new_repr(self) -> str:
return verifier_key

underlying_estimator_mock._verifier.__repr__ = new_repr

cacher = TwoViewEstimatorCacher(two_view_estimator_obj=underlying_estimator_mock)
Expand Down Expand Up @@ -78,7 +79,6 @@ def new_repr(self) -> str:
read_mock.assert_called_once_with(cache_path)
write_mock.assert_called_once()


@patch("gtsfm.utils.cache.generate_hash_for_numpy_array", return_value="numpy_key")
@patch("gtsfm.utils.io.read_from_bz2_file", return_value=_DUMMY_OUTPUT)
@patch("gtsfm.utils.io.write_to_bz2_file")
Expand All @@ -98,6 +98,7 @@ def test_cache_hit(

def new_repr(self) -> str:
return verifier_key

underlying_estimator_mock._verifier.__repr__ = new_repr
cacher = TwoViewEstimatorCacher(two_view_estimator_obj=underlying_estimator_mock)

Expand Down

0 comments on commit daf37c4

Please sign in to comment.