Skip to content

Commit

Permalink
Correct test of netCDF compare tool
Browse files Browse the repository at this point in the history
  • Loading branch information
gnrgomes committed Jul 4, 2024
1 parent 5afd9f9 commit 2ddc09f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from pathlib import Path

import pytest
import shutil

from lisfloodutilities.compare.pcr import PCRComparator, TSSComparator
from lisfloodutilities.compare.nc import NetCDFComparator
Expand Down Expand Up @@ -55,6 +56,11 @@ def test_netcdfcomp_diffdirs(self):
assert comp.diff_folder.joinpath('a_a.nc').exists(), 'Diff file A does not exist in %s' % comp.diff_folder
assert comp.diff_folder.joinpath('a_b.nc').exists(), 'Diff file B does not exist'
assert comp.diff_folder.joinpath('a_diff.nc').exists(), 'Diff file diff.nc does not exist'
# Clean the diff folder after the test since it is no longer needed
if comp.diff_folder is not None and comp.diff_folder.parent.name == 'diffs':
shutil.rmtree(comp.diff_folder.parent)
else:
shutil.rmtree(comp.diff_folder)

def test_netcdfcomp_submask(self):
comp = NetCDFComparator(mask='tests/data/submask/subcatchment_mask.map')
Expand Down

0 comments on commit 2ddc09f

Please sign in to comment.