class_docstr: Test suite for generate_velocity()
class_docstr_tok: ["Test","suite","for","generate_velocity","(",")"]
docstr: Test if the method raises a ValueError given invalid clamp size
docstr_tok: ["Test","if","the","method","raises","a","ValueError","given","invalid","clamp","size"]
code: def test_invalid_clamp_value(self, clamp):
      """Test if the method raises a ValueError given invalid clamp size"""
      with pytest.raises(ValueError):
          P.generate_velocity(n_particles=2, dimensions=3, clamp=clamp)
  
file_path: pyswarms/tests/backend/test_generators.py
imports: import numpy
  import pytest
  import pyswarms.backend
label_desc: Use image node_id 2 for calling the TestGenerateVelocity obj's underlying member method code with example usage: obj.test_invalid_clamp_value(clamp) without return types