@@ -1167,43 +1167,43 @@ def test_internal_cpp_api():
11671167 # C++ Triangulation.
11681168 with pytest .raises (
11691169 TypeError ,
1170- match = r'function takes exactly 7 arguments \(0 given\) ' ):
1170+ match = r'__init__\(\): incompatible constructor arguments. ' ):
11711171 mpl ._tri .Triangulation ()
11721172
11731173 with pytest .raises (
11741174 ValueError , match = r'x and y must be 1D arrays of the same length' ):
1175- mpl ._tri .Triangulation ([], [1 ], [[]], None , None , None , False )
1175+ mpl ._tri .Triangulation ([], [1 ], [[]], (), (), () , False )
11761176
11771177 x = [0 , 1 , 1 ]
11781178 y = [0 , 0 , 1 ]
11791179 with pytest .raises (
11801180 ValueError ,
11811181 match = r'triangles must be a 2D array of shape \(\?,3\)' ):
1182- mpl ._tri .Triangulation (x , y , [[0 , 1 ]], None , None , None , False )
1182+ mpl ._tri .Triangulation (x , y , [[0 , 1 ]], (), (), () , False )
11831183
11841184 tris = [[0 , 1 , 2 ]]
11851185 with pytest .raises (
11861186 ValueError ,
11871187 match = r'mask must be a 1D array with the same length as the '
11881188 r'triangles array' ):
1189- mpl ._tri .Triangulation (x , y , tris , [0 , 1 ], None , None , False )
1189+ mpl ._tri .Triangulation (x , y , tris , [0 , 1 ], (), () , False )
11901190
11911191 with pytest .raises (
11921192 ValueError , match = r'edges must be a 2D array with shape \(\?,2\)' ):
1193- mpl ._tri .Triangulation (x , y , tris , None , [[1 ]], None , False )
1193+ mpl ._tri .Triangulation (x , y , tris , () , [[1 ]], () , False )
11941194
11951195 with pytest .raises (
11961196 ValueError ,
11971197 match = r'neighbors must be a 2D array with the same shape as the '
11981198 r'triangles array' ):
1199- mpl ._tri .Triangulation (x , y , tris , None , None , [[- 1 ]], False )
1199+ mpl ._tri .Triangulation (x , y , tris , (), () , [[- 1 ]], False )
12001200
1201- triang = mpl ._tri .Triangulation (x , y , tris , None , None , None , False )
1201+ triang = mpl ._tri .Triangulation (x , y , tris , (), (), () , False )
12021202
12031203 with pytest .raises (
12041204 ValueError ,
1205- match = r'z array must have same length as triangulation x and y '
1206- r'array ' ):
1205+ match = r'z must be a 1D array with the same length as the '
1206+ r'triangulation x and y arrays ' ):
12071207 triang .calculate_plane_coefficients ([])
12081208
12091209 with pytest .raises (
@@ -1215,7 +1215,7 @@ def test_internal_cpp_api():
12151215 # C++ TriContourGenerator.
12161216 with pytest .raises (
12171217 TypeError ,
1218- match = r'function takes exactly 2 arguments \(0 given\) ' ):
1218+ match = r'__init__\(\): incompatible constructor arguments. ' ):
12191219 mpl ._tri .TriContourGenerator ()
12201220
12211221 with pytest .raises (
@@ -1233,7 +1233,8 @@ def test_internal_cpp_api():
12331233
12341234 # C++ TrapezoidMapTriFinder.
12351235 with pytest .raises (
1236- TypeError , match = r'function takes exactly 1 argument \(0 given\)' ):
1236+ TypeError ,
1237+ match = r'__init__\(\): incompatible constructor arguments.' ):
12371238 mpl ._tri .TrapezoidMapTriFinder ()
12381239
12391240 trifinder = mpl ._tri .TrapezoidMapTriFinder (triang )
0 commit comments