@@ -22,7 +22,8 @@ def test_max_len_string_array(self):
22
22
assert libwriters .max_len_string_array (arr ) == 3
23
23
24
24
# raises
25
- with pytest .raises (TypeError ):
25
+ msg = "No matching signature found"
26
+ with pytest .raises (TypeError , match = msg ):
26
27
libwriters .max_len_string_array (arr .astype ("U" ))
27
28
28
29
def test_fast_unique_multiple_list_gen_sort (self ):
@@ -100,9 +101,11 @@ def test_maybe_indices_to_slice_right_edge(self):
100
101
assert not isinstance (maybe_slice , slice )
101
102
tm .assert_numpy_array_equal (maybe_slice , indices )
102
103
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 ):
104
107
target [indices ]
105
- with pytest .raises (IndexError ):
108
+ with pytest .raises (IndexError , match = msg ):
106
109
target [maybe_slice ]
107
110
108
111
indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .int64 )
@@ -111,9 +114,9 @@ def test_maybe_indices_to_slice_right_edge(self):
111
114
assert not isinstance (maybe_slice , slice )
112
115
tm .assert_numpy_array_equal (maybe_slice , indices )
113
116
114
- with pytest .raises (IndexError ):
117
+ with pytest .raises (IndexError , match = msg ):
115
118
target [indices ]
116
- with pytest .raises (IndexError ):
119
+ with pytest .raises (IndexError , match = msg ):
117
120
target [maybe_slice ]
118
121
119
122
for case in [[99 , 97 , 99 , 96 ], [99 , 99 , 98 , 97 ], [98 , 98 , 97 , 96 ]]:
0 commit comments