Skip to content

Commit

Permalink
fix: test deprecation of fillNull
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Jan 28, 2024
1 parent 5796903 commit 9e9c6f4
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_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
@deprecated(version="1.0.0", reason="Don't use this method it's considered bad practice.")
def fillNull(Element, proxy=-999):
"""Fill null values of an Element's properties with a proxy value."""
raise Exception("This method is deprecated. Use ee.FeatureCollection.fill() instead")
raise NotImplementedError("This method is deprecated. Use ee.FeatureCollection.fill() instead")
8 changes: 8 additions & 0 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ def test_stretch_std(self):
def test_stretch_percentile(self):
with pytest.raises(NotImplementedError):
geetools.visualization.stretch_percentile(None, None)


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

def test_fillNull(self):
with pytest.raises(NotImplementedError):
geetools.tools.fillNull(None, None)

0 comments on commit 9e9c6f4

Please sign in to comment.