def METHOD_NAME(self):
    # Tests ask-and-tell related error handling.
    r, x, s = self.problem()
    opt = method(x)
    # Stop called when not running
    self.assertFalse(opt.running())
    self.assertFalse(opt.stop())
    # Best position and score called before run
    self.assertEqual(list(opt.x_best()), list(x))
    self.assertEqual(list(opt.x_guessed()), list(x))
    self.assertEqual(opt.f_best(), np.inf)
    self.assertEqual(opt.f_guessed(), np.inf)
    # Tell before ask
    self.assertRaisesRegex(
        Exception, r'ask\(\) not called before tell\(\)', opt.tell, 5)
    # Ask
    opt.ask()
    # Now we should be running
    self.assertTrue(opt.running())