class_docstr: Test suite for generate_velocity()
class_docstr_tok: ["Test","suite","for","generate_velocity","(",")"]
docstr: Test if method raises a TypeError given invalid clamp type
docstr_tok: ["Test","if","method","raises","a","TypeError","given","invalid","clamp","type"]
code: def test_invalid_clamp_type(self, clamp):
      """Test if method raises a TypeError given invalid clamp type"""
      with pytest.raises(TypeError):
          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 3 for calling the TestGenerateVelocity obj's underlying member method code with example usage: obj.test_invalid_clamp_type(clamp) without return types