@@ -28,7 +28,7 @@ def test_spherical_cartesian_inverse():
2828
2929
3030@pytest .mark .parametrize (
31- "testval, unit, wrap_at" ,
31+ ( "testval" , " unit" , " wrap_at") ,
3232 product (
3333 [
3434 (45.0 , - 90.0 , (0.0 , 0.0 , - 1.0 )),
@@ -71,7 +71,7 @@ def test_spherical_to_cartesian(testval, unit, wrap_at):
7171
7272
7373@pytest .mark .parametrize (
74- "lon, lat, unit, wrap_at" ,
74+ ( "lon" , " lat" , " unit" , " wrap_at") ,
7575 list (
7676 product (
7777 [0 , 45 , 90 , 135 , 180 , 225 , 270 , 315 , 360 ],
@@ -104,7 +104,7 @@ def test_cart2spher_at_pole(cart_to_spher):
104104
105105
106106@pytest .mark .parametrize (
107- "lonlat, unit, wrap_at" ,
107+ ( "lonlat" , " unit" , " wrap_at") ,
108108 list (
109109 product (
110110 [
@@ -146,7 +146,7 @@ def test_spher2cart_roundrip_arr(lonlat, unit, wrap_at):
146146 assert u .allclose (c2s (* s2c (lon , lat )), (olon , olat ), atol = atol )
147147
148148
149- @pytest .mark .parametrize ("unit1, unit2" , [(u .deg , 1 ), (1 , u .deg )])
149+ @pytest .mark .parametrize (( "unit1" , " unit2") , [(u .deg , 1 ), (1 , u .deg )])
150150def test_spherical_to_cartesian_mixed_Q (spher_to_cart , unit1 , unit2 ):
151151 with pytest .raises (TypeError ) as arg_err :
152152 spher_to_cart (135.0 * unit1 , 45.0 * unit2 )
@@ -157,7 +157,7 @@ def test_spherical_to_cartesian_mixed_Q(spher_to_cart, unit1, unit2):
157157
158158
159159@pytest .mark .parametrize (
160- "x, y, z" ,
160+ ( "x" , "y" , "z" ) ,
161161 sorted (
162162 list (
163163 set (
@@ -180,21 +180,17 @@ def test_cartesian_to_spherical_mixed_Q(cart_to_spher, x, y, z):
180180@pytest .mark .parametrize ("wrap_at" , ["1" , 180.0 , True , 180j , [180 ], - 180 , 0 ])
181181def test_c2s2c_wrong_wrap_type (spher_to_cart , cart_to_spher , wrap_at ):
182182 err_msg = "'wrap_lon_at' must be an integer number: 180 or 360"
183- with pytest .raises (ValueError ) as arg_err :
183+ with pytest .raises (ValueError , match = err_msg ) :
184184 geometry .SphericalToCartesian (wrap_lon_at = wrap_at )
185- assert arg_err .value .args [0 ] == err_msg
186185
187- with pytest .raises (ValueError ) as arg_err :
186+ with pytest .raises (ValueError , match = err_msg ) :
188187 spher_to_cart .wrap_lon_at = wrap_at
189- assert arg_err .value .args [0 ] == err_msg
190188
191- with pytest .raises (ValueError ) as arg_err :
189+ with pytest .raises (ValueError , match = err_msg ) :
192190 geometry .CartesianToSpherical (wrap_lon_at = wrap_at )
193- assert arg_err .value .args [0 ] == err_msg
194191
195- with pytest .raises (ValueError ) as arg_err :
192+ with pytest .raises (ValueError , match = err_msg ) :
196193 cart_to_spher .wrap_lon_at = wrap_at
197- assert arg_err .value .args [0 ] == err_msg
198194
199195
200196def test_cartesian_spherical_asdf (tmpdir ):
0 commit comments