Skip to content

Commit

Permalink
add test for issue #1152
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Feb 17, 2022
1 parent 5b1a69b commit 48d81da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Binary file added test/issue1152.nc
Binary file not shown.
8 changes: 8 additions & 0 deletions test/tst_masked.py
Expand Up @@ -85,6 +85,14 @@ def setUp(self):
var2[:] = masked_all((10,), "u1")
dataset.close()

# issue #1152: if missing_value is a string that can't
# be cast to the variable type, issue a warning instead
# of raising an exception when auto-converted slice to a
# masked array
dataset = netCDF4.Dataset('issue1152.nc')
data = dataset['v'][:]
dataset.close()

def tearDown(self):
# Remove the temporary files
os.remove(self.file)
Expand Down

0 comments on commit 48d81da

Please sign in to comment.