@@ -141,8 +141,7 @@ def test_list_input(self):
141
141
npt .assert_equal (line_block .x , np .array ([[1 , 2 , 3 ], [1 , 2 , 3 ]]))
142
142
143
143
def test_ragged_list_input (self ):
144
- npv = tuple ([int (x ) for x in np .__version__ .split ("." )[:3 ]])
145
- if npv >= (1 , 24 ):
144
+ if packaging .version .parse (np .__version__ ) >= packaging .version .parse ("1.24" ):
146
145
pytest .skip ("numpy to new - will raise error" )
147
146
x_data = [np .array ([1 , 2 , 3 ]), np .array ([1 , 2 , 3 , 4 ])]
148
147
y_data = [np .array ([5 , 6 , 7 ]), np .array ([4 , 2 , 9 , 10 ])]
@@ -157,8 +156,7 @@ def test_ragged_list_input(self):
157
156
assert_jagged_arrays_equal (line_block .y , np .array (y_data ))
158
157
159
158
def test_bad_ragged_list_input (self ):
160
- npv = tuple ([int (x ) for x in np .__version__ .split ("." )[:3 ]])
161
- if npv >= (1 , 24 ):
159
+ if packaging .version .parse (np .__version__ ) >= packaging .version .parse ("1.24" ):
162
160
pytest .skip ("numpy to new - will raise error" )
163
161
x_data = np .array ([np .array ([1 , 2 , 3 ]), np .array ([1 , 2 , 3 , 4 ])])
164
162
y_data = np .array ([np .array ([5 , 6 , 7 ]), np .array ([4 , 2 , 9 , 10 , 11 ])])
@@ -319,8 +317,7 @@ def test_Quiver(self):
319
317
320
318
@animation_compare (baseline_images = "Blocks/Surface" , nframes = 3 )
321
319
def test_Surface (self ):
322
- mpl_version = tuple ([int (x ) for x in mpl ._version .version .split ("." )[:3 ]])
323
- if mpl_version < (3 , 9 ):
320
+ if packaging .version .parse (mpl .__version__ ) < packaging .version .parse ("3.9.0" ):
324
321
pytest .xfail ("Updated for MPL 3.9.0" )
325
322
x = np .linspace (- 2 * np .pi , 2 * np .pi , 100 )
326
323
t = np .linspace (0 , 2 * np .pi , 3 )
0 commit comments