@@ -129,14 +129,20 @@ def test_attr_schema(type, value, validate, json):
129129 (DTypeSchema , (np .integer ,), {}, np .float32 , r'.*float.*' ),
130130 (DimsSchema , (('foo' , 'bar' ),), {}, ('foo' ,), r'.*length.*' ),
131131 (DimsSchema , (('foo' , 'bar' ),), {}, ('foo' , 'baz' ), r'.*mismatch.*' ),
132- (ShapeSchema , ((1 , 2 , None ),), {} , (1 , 2 ), r'.*number of dimensions.*' ),
132+ (ShapeSchema , ((1 , 2 , None ),), {}, (1 , 2 ), r'.*number of dimensions.*' ),
133133 (ShapeSchema , ((1 , 4 , 4 ),), {}, (1 , 3 , 4 ), r'.*mismatch.*' ),
134134 (NameSchema , ('foo' ,), {}, 'bar' , r'.*name bar != foo.*' ),
135135 (ArrayTypeSchema , (np .ndarray ,), {}, 'bar' , r'.*array_type.*' ),
136136 # schema_args for ChunksSchema include [chunks, dims, shape]
137137 (ChunksSchema , ({'x' : 3 },), {}, (((2 , 2 ),), ('x' ,), (4 ,)), r'.*(3).*' ),
138138 (ChunksSchema , ({'x' : (2 , 1 )},), {}, (((2 , 2 ),), ('x' ,), (4 ,)), r'.*(2, 1).*' ),
139- (ChunksSchema , ({'x' : (2 , 1 )},), {}, (None , ('x' ,), (4 ,)), r'.*expected array to be chunked.*' ),
139+ (
140+ ChunksSchema ,
141+ ({'x' : (2 , 1 )},),
142+ {},
143+ (None , ('x' ,), (4 ,)),
144+ r'.*expected array to be chunked.*' ,
145+ ),
140146 (ChunksSchema , (True ,), {}, (None , ('x' ,), (4 ,)), r'.*expected array to be chunked.*' ),
141147 (
142148 ChunksSchema ,
@@ -148,7 +154,13 @@ def test_attr_schema(type, value, validate, json):
148154 (ChunksSchema , ({'x' : - 1 },), {}, (((1 , 2 , 1 ),), ('x' ,), (4 ,)), r'.* did not match.*' ),
149155 (ChunksSchema , ({'x' : 2 },), {}, (((2 , 3 , 2 ),), ('x' ,), (7 ,)), r'.* did not match.*' ),
150156 (ChunksSchema , ({'x' : 2 },), {}, (((2 , 2 , 3 ),), ('x' ,), (7 ,)), r'.* did not match.*' ),
151- (ChunksSchema , ({'x' : 2 , 'y' : - 1 },), {}, (((2 , 2 ), (5 , 5 )), ('x' , 'y' ), (4 , 10 )), r'.*(5).*' ),
157+ (
158+ ChunksSchema ,
159+ ({'x' : 2 , 'y' : - 1 },),
160+ {},
161+ (((2 , 2 ), (5 , 5 )), ('x' , 'y' ), (4 , 10 )),
162+ r'.*(5).*' ,
163+ ),
152164 (
153165 AttrsSchema ,
154166 ({'foo' : AttrSchema (type = int )},),
@@ -180,7 +192,7 @@ def test_attr_schema(type, value, validate, json):
180192 (
181193 CoordsSchema ,
182194 ({'x' : DataArraySchema (name = 'x' )},),
183- {" allow_extra_keys" : False },
195+ {' allow_extra_keys' : False },
184196 [{'x' : xr .DataArray ([0 , 1 ], name = 'x' ), 'y' : xr .DataArray ([0 , 1 ], name = 'y' )}],
185197 r'coords has extra keys.*' ,
186198 ),
0 commit comments