Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
isatotun committed Nov 14, 2024
1 parent 5b3f774 commit d229916
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_raster_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,17 +288,17 @@ def dataset_with_leadtime(dataset_with_time):
return ds


def test_basic_upsampling(simple_dataset):
def test_basic_upsampling(dataset_with_time):
"""Test basic upsampling of a 2D dataset."""
target_res = 0.5 # Upsample from 1.0 to 0.5 degrees
result = upsample_raster(simple_dataset, resampled_resolution=target_res)
result = upsample_raster(dataset_with_time, resampled_resolution=target_res)

# Check output resolution
assert result.rio.resolution()[0] == target_res

# Check output dimensions doubled (since resolution halved)
assert result.rio.width == simple_dataset.rio.width * 2
assert result.rio.height == simple_dataset.rio.height * 2
assert result.rio.width == dataset_with_time.rio.width * 2
assert result.rio.height == dataset_with_time.rio.height * 2


def test_upsampling_with_time(dataset_with_time):
Expand Down

0 comments on commit d229916

Please sign in to comment.