Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDo1 committed Nov 8, 2024
1 parent 2604795 commit 56161f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_aggregate(raster_data, area_data):
clipped_ds = area.clip(raster_data)

# Aggregate the clipped data spatially
aggregated_df = area.aggregate(clipped_ds["var"], operations=["mean", "min"])
aggregated_df = area.aggregate(clipped_ds, variable="var", method="exact_extract", operations=["mean", "min"])

assert isinstance(aggregated_df, pd.DataFrame)
assert not aggregated_df.empty
Expand All @@ -148,5 +148,6 @@ def test_aggregate(raster_data, area_data):

# Make a dataframe with the expected values
expected_df = pd.DataFrame({"var_mean": expected_means, "var_min": expected_mins}, index=clipped_ds.time.values)
expected_df.index.name = "time"

assert pd.testing.assert_frame_equal(aggregated_df, expected_df, check_dtype=False) is None

0 comments on commit 56161f9

Please sign in to comment.