Skip to content

Commit

Permalink
fix: test the exception method (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Jan 28, 2024
2 parents 28becc8 + be8d662 commit 47d82d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/test_DateRange.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ def test_deprecated_alertnate_method(self, daterange_instance):
assert list.size().getInfo() == 30
assert first.format("YYYY-MM-dd").getInfo() == "2020-01-01"
assert last.format("YYYY-MM-dd").getInfo() == "2020-01-31"


class TestCheckUnit:
"""Test the ``check_unit`` method exception."""

def test_check_unit(self):
with pytest.raises(ValueError):
ee.DateRange.geetools.check_unit("toto")
2 changes: 1 addition & 1 deletion tests/test_Image/test_default_spectral_indices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ WI2: -0.3508100169371153
WI2015: -108966.54196450702
WRI: 0.39238655381190113
WVP: 681.9462692210739
kEVI: 0.754691564374628
kEVI: 0.7546915643746379
kIPVI: 0.6366978189206153
kNDVI: 0.27339563784123116
kRVI: 2.04969719717336
Expand Down

0 comments on commit 47d82d0

Please sign in to comment.