Skip to content

Commit

Permalink
Fix use of deprecated not_called
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Nov 22, 2023
1 parent 9d1d997 commit fbbf172
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyspectral/tests/test_rayleigh.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5):
refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 1.2, redband_refl)
np.testing.assert_allclose(refl_corr, 0)
assert isinstance(refl_corr, da.Array)
assert rsr_obj.not_called()
rsr_obj.assert_not_called()


class TestRayleigh:
Expand Down Expand Up @@ -385,7 +385,7 @@ def test_get_reflectance_float_wavelength(self, fake_lut_hdf5):
refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 0.634, redband_refl)
np.testing.assert_allclose(refl_corr, TEST_RAYLEIGH_RESULT3)
assert isinstance(refl_corr, np.ndarray)
assert rsr_obj.not_called()
rsr_obj.assert_not_called()

@patch('pyspectral.rayleigh.da', None)
def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5):
Expand All @@ -402,7 +402,7 @@ def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5):
refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 1.2, redband_refl)
np.testing.assert_allclose(refl_corr, 0)
assert isinstance(refl_corr, np.ndarray)
assert rsr_obj.not_called()
rsr_obj.assert_not_called()

def test_get_reflectance_no_lut(self, fake_lut_hdf5):
"""Test that missing a LUT causes an exception.."""
Expand Down

0 comments on commit fbbf172

Please sign in to comment.