File: test_issue908.py

package info (click to toggle)
netcdf4-python 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,588 kB
  • sloc: python: 6,002; ansic: 854; makefile: 15; sh: 2
file content (19 lines) | stat: -rw-r--r-- 410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import netCDF4, unittest
import numpy as np
import pathlib


class Issue908TestCase(unittest.TestCase):

    def setUp(self):
        self.nc = netCDF4.Dataset(pathlib.Path(__file__).parent / "CRM032_test1.nc")

    def tearDown(self):
        self.nc.close()

    def runTest(self):
        data = self.nc['rgrid'][:]
        assert data.all() is np.ma.masked 

if __name__ == '__main__':
    unittest.main()