12
12
13
13
import cf
14
14
15
- # REVIEW: h5: `test_NetCDF4Array.py`: renamed 'NetCDFArray' to 'NetCDF4Array'
16
15
n_tmpfiles = 1
17
16
tmpfiles = [
18
17
tempfile .mkstemp ("_test_NetCDF4Array.nc" , dir = os .getcwd ())[1 ]
@@ -41,7 +40,6 @@ class NetCDF4ArrayTest(unittest.TestCase):
41
40
dtype = np .dtype (float ),
42
41
)
43
42
44
- # REVIEW: h5: `test_NetCDF4Array`: renamed 'NetCDFArray' to 'NetCDF4Array'
45
43
def test_NetCDF4Array_del_file_location (self ):
46
44
a = cf .NetCDF4Array (("/data1/file1" , "/data2/file2" ), ("tas1" , "tas2" ))
47
45
b = a .del_file_location ("/data1" )
@@ -62,7 +60,6 @@ def test_NetCDF4Array_del_file_location(self):
62
60
with self .assertRaises (ValueError ):
63
61
b .del_file_location ("/data1/" )
64
62
65
- # REVIEW: h5: `test_NetCDF4Array`: renamed 'NetCDFArray' to 'NetCDF4Array'
66
63
def test_NetCDF4Array_file_locations (self ):
67
64
a = cf .NetCDF4Array ("/data1/file1" )
68
65
self .assertEqual (a .file_locations (), ("/data1" ,))
@@ -73,7 +70,6 @@ def test_NetCDF4Array_file_locations(self):
73
70
a = cf .NetCDF4Array (("/data1/file1" , "/data2/file2" , "/data1/file2" ))
74
71
self .assertEqual (a .file_locations (), ("/data1" , "/data2" , "/data1" ))
75
72
76
- # REVIEW: h5: `test_NetCDF4Array`: renamed 'NetCDFArray' to 'NetCDF4Array'
77
73
def test_NetCDF4Array_add_file_location (self ):
78
74
a = cf .NetCDF4Array ("/data1/file1" , "tas" )
79
75
b = a .add_file_location ("/home/user" )
@@ -109,15 +105,13 @@ def test_NetCDF4Array_add_file_location(self):
109
105
self .assertEqual (b .get_filenames (), a .get_filenames ())
110
106
self .assertEqual (b .get_addresses (), a .get_addresses ())
111
107
112
- # REVIEW: h5: `test_NetCDF4Array`: renamed 'NetCDFArray' to 'NetCDF4Array'
113
108
def test_NetCDF4Array__dask_tokenize__ (self ):
114
109
a = cf .NetCDF4Array ("/data1/file1" , "tas" , shape = (12 , 2 ), mask = False )
115
110
self .assertEqual (tokenize (a ), tokenize (a .copy ()))
116
111
117
112
b = cf .NetCDF4Array ("/home/file2" , "tas" , shape = (12 , 2 ))
118
113
self .assertNotEqual (tokenize (a ), tokenize (b ))
119
114
120
- # REVIEW: h5: `test_NetCDF4Array`: renamed 'NetCDFArray' to 'NetCDF4Array'
121
115
def test_NetCDF4Array_multiple_files (self ):
122
116
f = cf .example_field (0 )
123
117
cf .write (f , tmpfile1 )
@@ -135,7 +129,6 @@ def test_NetCDF4Array_multiple_files(self):
135
129
self .assertEqual (len (n .get_filenames ()), 2 )
136
130
self .assertTrue ((n [...] == f .array ).all ())
137
131
138
- # REVIEW: getitem: `test_NetCDF4Array`: test `NetCDF4Array.shape`
139
132
def test_NetCDF4Array_shape (self ):
140
133
shape = (12 , 73 , 96 )
141
134
a = cf .NetCDF4Array ("/home/file2" , "tas" , shape = shape )
@@ -145,7 +138,6 @@ def test_NetCDF4Array_shape(self):
145
138
self .assertEqual (a .shape , (shape [0 ] // 2 ,) + shape [1 :])
146
139
self .assertEqual (a .original_shape , shape )
147
140
148
- # REVIEW: getitem: `test_NetCDF4Array`: test `NetCDF4Array.index`
149
141
def test_NetCDF4Array_index (self ):
150
142
shape = (12 , 73 , 96 )
151
143
a = cf .NetCDF4Array ("/home/file2" , "tas" , shape = shape )
0 commit comments