Skip to content

Commit

Permalink
Added tests for 20-cat files
Browse files Browse the repository at this point in the history
  • Loading branch information
dargueso authored and jkittner committed Feb 14, 2022
1 parent 6b14fe5 commit 9251f84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Binary file added testing/5by5_20cat.nc
Binary file not shown.
13 changes: 10 additions & 3 deletions tests/w2w_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ def test_check_lcz_wrf_extent_ok(capsys):
assert 'OK - LCZ domain is covering WRF domain' in out


def test_wrf_remove_urban(tmpdir):
@pytest.mark.parametrize(
('dst_file', 'dst_nu_file'),
(
pytest.param('testing/5by5.nc', '5by5_new.nc', id='all cat'),
pytest.param('testing/5by5_20cat.nc', '5by5_20cat_new.nc', id='20 cat'),
)
)
def test_wrf_remove_urban(tmpdir, dst_file, dst_nu_file):
info = {
'dst_file': 'testing/5by5.nc',
'dst_nu_file': os.path.join(tmpdir, '5by5_new.nc')
'dst_file': dst_file,
'dst_nu_file': os.path.join(tmpdir, dst_nu_file)
}
old_ds = xarray.open_dataset(info['dst_file'])
wrf_remove_urban(info=info, NPIX_NLC=9)
Expand Down

0 comments on commit 9251f84

Please sign in to comment.