class_docstr: Unit test class for general utilities. 
class_docstr_tok: ["Unit","test","class","for","general","utilities","."]
docstr: Sets up attributes. 
docstr_tok: ["Sets","up","attributes","."]
code: def setUp(self):
      """Sets up attributes."""
      self.problems = []
      self.max_evals = 20000  # 1e4
      # First problem
      obj = lambda x: np.dot(x - 1, x)
      dim = 4
      min_pt = np.array([0.5] * dim)
      max_pt = np.array([-1] * dim)
      self.problems.append(
          self._get_test_case_problem_instance(
              obj, [-1] * dim, [1] * dim, min_pt, max_pt, "4D-quadratic"
          )
      )
      # Second problem
      obj = lambda x: np.exp(-np.dot(x - 0.5, x))
      dim = 2
      min_pt = np.array([-1] * dim)
      max_pt = np.array([0.25] * dim)
      self.problems.append(
          self._get_test_case_problem_instance(
              obj, [-1] * dim, [1] * dim, min_pt, max_pt, "2D-gaussian"
          )
      )
      # Third problem - use Hartmann6
      hartmann_data = get_mf_hartmann_function_data(0, 6)
      obj = hartmann_data[1]
      max_pt = hartmann_data[2]
      min_pt = None
      domain_bounds = np.array(hartmann_data[-1])
      self.problems.append(
          self._get_test_case_problem_instance(
              obj,
              domain_bounds[:, 0],
              domain_bounds[:, 1],
              min_pt,
              max_pt,
              "Hartmann6",
          )
      )
  
imports: from __future__ import absolute_import
  import os
  import time
  from argparse import Namespace
  import numpy
  from .ancillary_utils import is_nondecreasing
  from .base_test_class import BaseTestClass, execute_tests
  from .euclidean_synthetic_functions import get_mf_hartmann_function_data
  from .None import oper_utils
label_desc: Use image node_id 2 for calling the OptimisersTestCase obj's underlying member method code with example usage: obj.setUp() without return types