@@ -298,7 +298,7 @@ def test_equal(l1, l2):
298298 for function in [f , f_vec ]:
299299 learner = Learner1D (function , bounds = (- 1 , 1 ))
300300 learner2 = Learner1D (function , bounds = (- 1 , 1 ))
301- simple (learner , goal = lambda l : l . npoints > 200 )
301+ simple (learner , goal = 200 )
302302 xs , ys = zip (* learner .data .items ())
303303
304304 # Make the scale huge to no get a scale doubling
@@ -374,7 +374,7 @@ def f(x):
374374 loss = curvature_loss_function ()
375375 assert loss .nth_neighbors == 1
376376 learner = Learner1D (f , (- 1 , 1 ), loss_per_interval = loss )
377- simple (learner , goal = lambda l : l . npoints > 100 )
377+ simple (learner , goal = 100 )
378378 assert learner .npoints > 100
379379
380380
@@ -385,7 +385,7 @@ def f(x):
385385 loss = curvature_loss_function ()
386386 assert loss .nth_neighbors == 1
387387 learner = Learner1D (f , (- 1 , 1 ), loss_per_interval = loss )
388- simple (learner , goal = lambda l : l . npoints > 100 )
388+ simple (learner , goal = 100 )
389389 assert learner .npoints > 100
390390
391391
@@ -398,7 +398,7 @@ def f(x):
398398 return x + a ** 2 / (a ** 2 + x ** 2 )
399399
400400 learner = Learner1D (f , bounds = (- 1 , 1 ))
401- simple (learner , lambda l : l . npoints > 100 )
401+ simple (learner , 100 )
402402
403403
404404def test_inf_loss_with_missing_bounds ():
@@ -408,6 +408,6 @@ def test_inf_loss_with_missing_bounds():
408408 loss_per_interval = curvature_loss_function (),
409409 )
410410 # must be done in parallel because otherwise the bounds will be evaluated first
411- BlockingRunner (learner , goal = lambda learner : learner . loss () < 0.01 )
411+ BlockingRunner (learner , goal = 0.01 )
412412
413413 learner .npoints > 20
0 commit comments