@@ -214,14 +214,12 @@ def test_to_from_file(self, mock_data, mock_weight, tmp_path):
214
214
assert orig .count_nodes () == restored .count_nodes ()
215
215
assert_array_equal (orig .data , restored .data )
216
216
217
- @mark .skip
218
217
def test_count_radius_no_radius (self , rand_data_weight ):
219
218
data , _ = rand_data_weight
220
219
tree = BallTree (data )
221
220
with raises (TypeError ):
222
221
tree .count_radius (data [0 ])
223
222
224
- @mark .skip
225
223
@mark .parametrize ("radius" , radius_testvalues )
226
224
def test_count_radius_single (self , radius , rand_data_weight ):
227
225
data , _ = rand_data_weight
@@ -233,36 +231,34 @@ def test_count_radius_single(self, radius, rand_data_weight):
233
231
count = brute_force ((data , weight ), (p , w ), radius )
234
232
assert_almost_equal (tree .count_radius (p , radius ), count )
235
233
236
- @mark .skip
237
234
@mark .parametrize ("radius" , radius_testvalues )
238
235
def test_count_radius_single_weight (self , radius , rand_data_weight ):
239
236
data , weight = rand_data_weight
240
237
tree = BallTree (data , weight )
241
238
242
239
p = data [0 ]
243
- w = weight [0 ]
240
+ w = float ( weight [0 ])
244
241
count = brute_force ((data , weight ), (p , w ), radius )
245
242
assert_almost_equal (tree .count_radius (p , radius , weight = w ), count )
246
243
247
- @mark .skip
248
244
@mark .parametrize ("radius" , radius_testvalues )
249
245
def test_count_radius_multi (self , radius , rand_data_weight ):
250
246
data , weight = rand_data_weight
251
247
tree = BallTree (data , weight )
252
248
253
249
count = 0.0
254
250
for p , w in zip (data , weight ):
255
- count += brute_force ((data , weight ), (p , w ), radius )
251
+ count += brute_force ((data , weight ), (p , float ( w ) ), radius )
256
252
assert_almost_equal (tree .count_radius (data , radius , weight ), count )
257
253
258
- @mark .skip # xfail
254
+ @mark .xfail
259
255
@mark .parametrize ("rmin,rmax" , rminmax_testvalues )
260
256
def test_count_range_single (self , rmin , rmax , rand_data_weight ):
261
257
data , weight = rand_data_weight
262
258
tree = BallTree (data , weight )
263
259
264
260
p = data [0 ]
265
- w = weight [0 ]
261
+ w = float ( weight [0 ])
266
262
count = brute_force ((data , weight ), (p , w ), rmax ) - brute_force (
267
263
(data , weight ), (p , w ), rmin
268
264
)
@@ -278,7 +274,7 @@ def test_dualcount_radius(self, radius, rand_data_weight):
278
274
count += brute_force ((data , weight ), (p , w ), radius )
279
275
assert_almost_equal (tree .dualcount_radius (tree , radius ), count )
280
276
281
- @mark .skip # xfail
277
+ @mark .xfail
282
278
@mark .parametrize ("rmin,rmax" , rminmax_testvalues )
283
279
def test_dualcount_range (self , rmin , rmax , rand_data_weight ):
284
280
data , weight = rand_data_weight
@@ -287,7 +283,7 @@ def test_dualcount_range(self, rmin, rmax, rand_data_weight):
287
283
288
284
count = 0.0
289
285
for p , w in zip (data , weight ):
290
- count += brute_force ((data , weight ), (p , w ), rmax ) - brute_force (
286
+ count += brute_force ((data , weight ), (p , float ( w ) ), rmax ) - brute_force (
291
287
(data , weight ), (p , w ), rmin
292
288
)
293
289
assert_almost_equal (tree .dualcount_range (tree , rmin , rmax ), count )
0 commit comments