class_docstr: Abstract class that defines various tests for high-level optimizers
  
  Whenever an optimizer implementation inherits from ABCTestOptimizer,
  you don't need to write down all tests anymore. Instead, you can just
  specify all required fixtures in the test suite.
class_docstr_tok: ["Abstract","class","that","defines","various","tests","for","high-level","optimizers","Whenever","an","optimizer","implementation","inherits","from","ABCTestOptimizer",",","you","do","n't","need","to","write","down","all","tests","anymore",".","Instead",",","you","can","just","specify","all","required","fixtures","in","the","test","suite","."]
docstr: Test if kwargs are passed properly in objfunc
docstr_tok: ["Test","if","kwargs","are","passed","properly","in","objfunc"]
code: def test_obj_with_kwargs(self, obj_with_args, optimizer, options):
      """Test if kwargs are passed properly in objfunc"""
      x_max = 10 * np.ones(2)
      x_min = -1 * x_max
      bounds = (x_min, x_max)
      opt = optimizer(100, 2, options=options, bounds=bounds)
      cost, pos = opt.optimize(obj_with_args, 1000, a=1, b=100)
      assert np.isclose(cost, 0, rtol=1e-03)
      assert np.isclose(pos[0], 1.0, rtol=1e-03)
      assert np.isclose(pos[1], 1.0, rtol=1e-03)
  
imports: import abc
  import numpy
  import pytest
  from pyswarms.utils.functions.single_obj import rosenbrock, sphere
label_desc: Use image node_id 11 for calling the ABCTestOptimizer obj's underlying member method code with example usage: obj.test_obj_with_kwargs(obj_with_args, optimizer, options) without return types