code: def test_inf_bounds(self):
      error_msg = "Bounds must not be inf."
      bounds = Bounds([-np.inf, -1], [-2, np.inf])
      with pytest.raises(ValueError, match=error_msg):
          direct(self.styblinski_tang, bounds)
  
imports: from numpy.testing import assert_allclose, assert_array_less
  import pytest
  import numpy
  from scipy.optimize import direct, Bounds
label_desc: Use image node_id 31 for calling the TestDIRECT obj's underlying member method code with example usage: obj.test_inf_bounds() without return types