Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervdw committed Aug 19, 2024
1 parent 76eb663 commit 16f487b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dask_geomodeling/tests/test_raster_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_period(raster, freq, closed, label, timezone, expected):
(None, None, "D", "right", "left", "UTC", (dt(2000, 1, 2), None)),
(None, None, "D", "right", "right", "UTC", (dt(2000, 1, 3), None)),
(None, None, "D", "left", "left", "Europe/Amsterdam", (dt(2000, 1, 2, 23), None)),
(None, None, "h", "right", "left", "UTC", (dt(2000, 1, 2, 23), None)),
(None, None, "H", "right", "left", "UTC", (dt(2000, 1, 2, 23), None)),
# (start, None) means 'nearest'; expected are the labels of the nearest bins
# left out-of-bounds
(dt(1999, 5, 6), None, "MS", "left", "left", "UTC", (dt(2000, 1, 1), None)),
Expand Down Expand Up @@ -504,7 +504,7 @@ def test_get_data_sum_week(self):
assert_equal(result, [[[1.0, 0.0, 0.0]]])

def test_get_data_sum_month(self):
view = self.klass(self.raster, frequency="ME", statistic="sum")
view = self.klass(self.raster, frequency="M", statistic="sum")
result = view.get_data(**self.request_all)["values"]
assert_equal(result, [[[1.0, 0.0, 0.0]], [[2.0, 0.0, 0.0]], [[3.0, 0.0, 0.0]]])
result = view.get_data(**self.request_first_two)["values"]
Expand All @@ -526,7 +526,7 @@ def test_get_data_sum_no_freq(self):
assert_equal(result, [[[3.0, 0.0, 0.0]]])

def test_get_data_count(self):
view = self.klass(self.raster, frequency="ME", statistic="count")
view = self.klass(self.raster, frequency="M", statistic="count")
result = view.get_data(**self.request_all)
assert_equal(result["values"], [[[1, 1, 0]], [[2, 2, 0]], [[3, 3, 0]]])

Expand Down

0 comments on commit 16f487b

Please sign in to comment.