Skip to content

Commit

Permalink
fix: deprecate collection (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Jan 28, 2024
2 parents ba22a78 + 86615e6 commit dd50534
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion geetools/tools/_deprecated_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@deprecated(version="1.0.0", reason="Use map without indices instead.")
def enumerate(collection):
"""Create a list of lists in which each element of the list is: [index, element]."""
raise Exception("Use map without indices instead.")
raise NotImplementedError("Use map without indices instead.")


@deprecated(version="1.0.0", reason="Use map ee.join.byProperty instead.")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ def test_stretch_percentile(self):
geetools.visualization.stretch_percentile(None, None)


class TestCollection:
"""Test methods from the deprecated_collection module."""

def test_enumerate(self):
with pytest.raises(NotImplementedError):
geetools.collection.enumerate(None)


class TestElement:
"""Test the methods from the deprecated_element module."""

Expand Down

0 comments on commit dd50534

Please sign in to comment.