Skip to content

Commit

Permalink
Fix missing fixture in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahker committed Oct 9, 2024
1 parent a622fe9 commit 64bc77a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_raster_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import rioxarray # noqa: F401
import xarray as xr
from pandas.testing import assert_frame_equal
from rasterio.transform import from_bounds
from shapely.geometry import Polygon

from src.utils.raster_utils import (
Expand Down Expand Up @@ -48,6 +49,11 @@ def sample_gdf():
return gpd.GeoDataFrame({"geometry": [geometry]})


@pytest.fixture
def sample_transform():
return from_bounds(0, 0, 3, 3, 3, 3)


def test_fast_zonal_stats(sample_raster, sample_admin_raster, dropped_admin_raster):
stats = ["mean", "max", "min", "median", "sum", "std", "count"]
result = fast_zonal_stats(sample_raster, sample_admin_raster, stats)
Expand Down

0 comments on commit 64bc77a

Please sign in to comment.