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 error is raised with wrong kwargs
docstr_tok: ["Test","if","error","is","raised","with","wrong","kwargs"]
code: def test_obj_incorrect_kwargs(
      self, obj_with_args, optimizer, options
  ):
      """Test if error is raised with wrong kwargs"""
      x_max = 10 * np.ones(2)
      x_min = -1 * x_max
      bounds = (x_min, x_max)
      opt = optimizer(100, 2, options=options, bounds=bounds)
      with pytest.raises(TypeError):
          # Wrong kwargs
          cost, pos = opt.optimize(obj_with_args, 1000, c=1, d=100)
  
imports: import abc
  import numpy
  import pytest
  from pyswarms.utils.functions.single_obj import rosenbrock, sphere
label_desc: Use image node_id 14 for calling the ABCTestOptimizer obj's underlying member method code with example usage: obj.test_obj_incorrect_kwargs(obj_with_args, optimizer, options) without return types