class_docstr: Test suite for compute_velocity()
class_docstr_tok: ["Test","suite","for","compute_velocity","(",")"]
docstr: Test if method raises KeyError with missing kwargs
docstr_tok: ["Test","if","method","raises","KeyError","with","missing","kwargs"]
code: def test_missing_kwargs(self, swarm, options, vh_strat):
      """Test if method raises KeyError with missing kwargs"""
      vh = VelocityHandler(strategy=vh_strat)
      with pytest.raises(KeyError):
          swarm.options = options
          clamp = (0, 1)
          P.compute_velocity(swarm, clamp, vh)
  
file_path: pyswarms/tests/backend/test_operators.py
imports: import numpy
  import pytest
  import pyswarms.backend
  from pyswarms.backend.handlers import BoundaryHandler, VelocityHandler
label_desc: Use image node_id 3 for calling the TestComputeVelocity obj's underlying member method code with example usage: obj.test_missing_kwargs(swarm, options, vh_strat) without return types