Beispiel #1
0
 def test_upperbond_transforms_int_param_if_it_is_larger_than_int_val(self):
     n = SuperBond(i_ub=151)
     self.assertEqual(n.i_ub, 150)
Beispiel #2
0
 def test_upperbond_does_not_transform_callable_param_if_it_is_less_than_callable_val(
         self):
     n = SuperBond(c_ub=100)
     self.assertEqual(n.c_ub, 100)
Beispiel #3
0
 def test_upperbond_does_not_transform_types_param_if_it_is_less_than_types_val(
         self):
     n = SuperBond(t_ub=100)
     self.assertEqual(n.t_ub, 100)
Beispiel #4
0
 def test_upperbond_transforms_types_param_if_it_is_larger_than_types_val(
         self):
     n = SuperBond(t_ub=151)
     self.assertEqual(n.t_ub, 150)
Beispiel #5
0
 def test_upperbond_does_not_transform_float_param_if_it_is_less_than_float_val(
         self):
     n = SuperBond(f_ub=100.0)
     self.assertEqual(n.f_ub, 100.0)
Beispiel #6
0
 def test_upperbond_transforms_float_param_if_it_is_larger_than_float_val(
         self):
     n = SuperBond(f_ub=151.0)
     self.assertEqual(n.f_ub, 150.0)
Beispiel #7
0
 def test_upperbond_transforms_callable_param_if_it_is_larger_than_callable_val(
         self):
     n = SuperBond(c_ub=151)
     self.assertEqual(n.c_ub, 150)
Beispiel #8
0
 def test_lowerbond_does_not_transform_types_param_if_it_is_greater_than_types_val(
         self):
     n = SuperBond(t_lb=2)
     self.assertEqual(n.t_lb, 2)
Beispiel #9
0
 def test_lowerbond_transforms_int_param_if_it_is_less_than_int_val(self):
     n = SuperBond(i_lb=-1)
     self.assertEqual(n.i_lb, 1)
Beispiel #10
0
 def test_lowerbond_does_not_transform_callable_param_if_it_is_greater_than_callable_val(
         self):
     n = SuperBond(c_lb=2)
     self.assertEqual(n.c_lb, 2)
Beispiel #11
0
 def test_lowerbond_does_not_transform_float_param_if_it_is_greater_than_float_val(
         self):
     n = SuperBond(f_lb=2.0)
     self.assertEqual(n.f_lb, 2.0)
Beispiel #12
0
 def test_lowerbond_transforms_types_param_if_it_is_less_than_types_val(
         self):
     n = SuperBond(t_lb=-1)
     self.assertEqual(n.t_lb, 1)
Beispiel #13
0
 def test_lowerbond_transforms_callable_param_if_it_is_less_than_callable_val(
         self):
     n = SuperBond(c_lb=-1)
     self.assertEqual(n.c_lb, 1)
Beispiel #14
0
 def test_lowerbond_transforms_float_param_if_it_is_less_than_float_val(
         self):
     n = SuperBond(f_lb=-1.0)
     self.assertEqual(n.f_lb, 1.0)