Skip to content

Commit

Permalink
Update test lfcoords
Browse files Browse the repository at this point in the history
  • Loading branch information
casadoj committed Aug 28, 2024
1 parent 41eff6a commit 88cc932
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions tests/test_lfcoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pandas as pd
import pandas.testing as pdt
from lisfloodutilities.lfcoords import Config
from lilisfloodutilities.lfcoords.finer_grid import coordinates_fine
from llisfloodutilities.lfcoords.coarser_grid import coordinates_coarse
from lisfloodutilities.lfcoords.finer_grid import coordinates_fine
from lisfloodutilities.lfcoords.coarser_grid import coordinates_coarse


class TestCatchStats(unittest.TestCase):
Expand All @@ -18,18 +18,12 @@ def test_lfcoords(self):
stations_HR = coordinates_fine(cfg, save=False)
test = coordinates_coarse(cfg, stations_HR, save=False)


# maps = read_inputmaps(self.path / 'maps')
# masks = read_masks(self.path / 'masks')
# weight = read_pixarea(self.path / 'pixarea_iberian_01min.nc')
# test = catchment_statistics(maps, masks, ['mean', 'std', 'min', 'max', 'count'], weight=weight, output=None).to_pandas()

# load expected values
expected = pd.read_csv(self.path / 'expected.csv', index_col='id')
expected = pd.read_csv(self.path / 'expected.csv', index_col='ID')
expected.index =expected.index.astype(test.index.dtype)

# check
try:
pdt.assert_frame_equal(test, expected)
pdt.assert_frame_equal(test, expected, check_dtype=False)
except AssertionError as e:
print(e)

0 comments on commit 88cc932

Please sign in to comment.