@@ -22,7 +22,8 @@ def test_max_len_string_array(self):
2222 assert libwriters .max_len_string_array (arr ) == 3
2323
2424 # raises
25- with pytest .raises (TypeError ):
25+ msg = "No matching signature found"
26+ with pytest .raises (TypeError , match = msg ):
2627 libwriters .max_len_string_array (arr .astype ("U" ))
2728
2829 def test_fast_unique_multiple_list_gen_sort (self ):
@@ -100,9 +101,11 @@ def test_maybe_indices_to_slice_right_edge(self):
100101 assert not isinstance (maybe_slice , slice )
101102 tm .assert_numpy_array_equal (maybe_slice , indices )
102103
103- with pytest .raises (IndexError ):
104+ msg = "index 100 is out of bounds for axis (0|1) with size 100"
105+
106+ with pytest .raises (IndexError , match = msg ):
104107 target [indices ]
105- with pytest .raises (IndexError ):
108+ with pytest .raises (IndexError , match = msg ):
106109 target [maybe_slice ]
107110
108111 indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .int64 )
@@ -111,9 +114,9 @@ def test_maybe_indices_to_slice_right_edge(self):
111114 assert not isinstance (maybe_slice , slice )
112115 tm .assert_numpy_array_equal (maybe_slice , indices )
113116
114- with pytest .raises (IndexError ):
117+ with pytest .raises (IndexError , match = msg ):
115118 target [indices ]
116- with pytest .raises (IndexError ):
119+ with pytest .raises (IndexError , match = msg ):
117120 target [maybe_slice ]
118121
119122 for case in [[99 , 97 , 99 , 96 ], [99 , 99 , 98 , 97 ], [98 , 98 , 97 , 96 ]]:
0 commit comments